スポンサーリンク

Qt:Qtプログラムで Zip/UnZip

当サイトは、アフィリエイト広告を利用しています

Qtプログラムで Zip/UnZipする。

※QuaZIPをダウンロードする必要があります。
http://quazip.sourceforge.net

※私の環境では、QuaZipのmakeでエラーになり、

#include “zlib.h”

#include

に置き換えることで解消できました。

環境:QT5.5

リンク
JlCompress Class Reference

インクルードファイル

#include 
#include 

コード

 

    QString strFile = "test.zip";
    QString strDir = "C:\test");

    // ディレクトリを圧縮
    JlCompress::compressDir(strFile, strDir, true);

コメント

タイトルとURLをコピーしました