做网站商城前景怎么样,如何跟客户销售做网站,推广比较好的网站,深圳 建网站qt 5.15.2压缩和解压缩功能
主要是添加qt项目文件.pro内容#xff1a; 这里要先下载quazip的c项目先编译后引入到本项目中/zip目录下
INCLUDEPATH ./zip
CONFIG(debug, debug|release) {win32:win32-g: PRE_TARGETDEPS $$PWD/zip/libquazipd.awin32:win32-g: LIBS -L$$PWD…qt 5.15.2压缩和解压缩功能
主要是添加qt项目文件.pro内容 这里要先下载quazip的c项目先编译后引入到本项目中/zip目录下
INCLUDEPATH ./zip
CONFIG(debug, debug|release) {win32:win32-g: PRE_TARGETDEPS $$PWD/zip/libquazipd.awin32:win32-g: LIBS -L$$PWD/zip/ -l quazipd
} else {win32:win32-g: PRE_TARGETDEPS $$PWD/zip/libquazip.awin32:win32-g: LIBS -L$$PWD/zip/ -l quazip
}完整的qt项目文件.pro内容如下所示
QT coreINCLUDEPATH ./zip
CONFIG(debug, debug|release) {win32:win32-g: PRE_TARGETDEPS $$PWD/zip/libquazipd.awin32:win32-g: LIBS -L$$PWD/zip/ -l quazipd
} else {win32:win32-g: PRE_TARGETDEPS $$PWD/zip/libquazip.awin32:win32-g: LIBS -L$$PWD/zip/ -l quazip
}CONFIG c17 cmdline# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES QT_DISABLE_DEPRECATED_BEFORE0x060000 # disables all the APIs deprecated before Qt 6.0.0SOURCES \main.cpp# Default rules for deployment.
qnx: target.path /tmp/$${TARGET}/bin
else: unix:!android: target.path /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS targetDISTFILES \zip/libquazipd.a \zip/quazipd.dllHEADERS \zip/JlCompress.h \zip/quazip.h \zip/quazipfile.h \zip/quazipfileinfo.h
根目录下zip目录情况如下所示 main.cpp
#include QCoreApplication
#include JlCompress.h
#include iostreamint printf(QString line)
{std::coutline.toStdString()std::endl;
}
int printf(int line)
{std::coutlinestd::endl;
}int main(int argc, char *argv[])
{QCoreApplication a(argc, argv);//解压缩JlCompress::extractDir(C:\\data\\obj\\Tile_006_006_OBJ.zip,C:\\data\\obj\\Tile_006_006_OBJ);printf(解压缩成功);JlCompress::compressDir(c:\\data\\obj\\test55.zip,C:\\data\\obj\\Tile_006_006_OBJ);printf(压缩成功);a.quit();return a.exec();
}
本blog地址https://blog.csdn.net/hsg77