February 8, 2013

Serenity Serenity
Lab Rat
88 posts

Qt & Zip files

 

Hey guys,

I am wondering, why Qt doesn’t support reading/writing ZIP files. I noticed, that you have QZipWriter / QZipReader class with following header:

  1. //
  2. //  W A R N I N G
  3. //  -------------
  4. //
  5. // This file is not part of the Qt API.  It exists for the convenience
  6. // of the QZipWriter class.  This header file may change from
  7. // version to version without notice, or even be removed.
  8. //
  9. // We mean it.
  10. //

I am a little confused. Wouldn’t it be great, if Qt could support that? Why is that not part of the Qt API?
What’s wrong with that class? You need it for writing OpenDocument files and it seems to work (not the ODF format but zipping).

3 replies

February 8, 2013

Andre Andre
Robot Herder
6422 posts

This is a FAQ. Unfurtunately, the FAQ category has been hidden a bit on the qt-project website. However, this is the article on using compression.

February 8, 2013

Serenity Serenity
Lab Rat
88 posts

Thank you for the answer.
In your article, it is mentioned, that I have to use 3rd party libs for creating/reading archive files. But with QZipWriter / QZipReader, it is possible to do that also.

That’s the question: Why is that not part of the Qt Api? It still implemented in Qt, but not documented and it is necessary to write/read ODF files. qCompress/qUncrompress is not useful if I want to create a zip-archive or to implement the ODT/DOCX format by my own.

February 8, 2013

Serenity Serenity
Lab Rat
88 posts

It’s not anymore important: I found that in the bugtracker:
https://bugreports.qt-project.org/browse/QTBUG-20896
(Related to that, which looks really similar to my post: https://bugreports.qt-project.org/browse/QTBUG-3897 )

So, I am waiting for 5.1 :)

 
  ‹‹ Qt5 multimedia - mjpeg support      My app need a old version of "libpng" ››

You must log in to post a reply. Not a member yet? Register here!