How to read the .gz files
-
There is no Qt builtin way to read gzip compressed files with an QIODevice. You will have to resort either to call an external program or to incorporate "zlib":http://zlib.net/ into your program. For the former, you may call "gunizp -c" plus the path to your file via [[Doc:QProcess]] and read from the standard output of the process.
-
Way: locale unzipper in src/ directory. Build it. Now you can do it like that:
@
//.....
shell = new QProcess(this);
QStringList argv() << myfile.fileName();
shell.start("./src/unzip",argv); // or in win32 - src/unzip.exe
//.....
@
And you have to create some signal-slot connections. But at first read about QProcess and gzip -
This is a FAQ. There is an entry on it "here":http://developer.qt.nokia.com/faq/answer/how_to_compress_data_with_qt .