qt creator - How to use DEPLOYMENTFOLDERS directive in Qt Widget based application -
when use qt creator create qt quick / qml project adds deploymentfolders .pro file. can use directive folders/files copied build directory upon building (compilation) of application.
how can use in simple qt widget based application?
qt creator doesn't add simple qt project , when manually it, it's not working.
this project file:
folder_01.source = sounds #folder_01.target = deploymentfolders += folder_01 qt += core gui widgets target = myapp template = app sources += main.cpp
i tried "/sounds" , "sounds/*" , thinks that. nothing works. missing here?
i researching , stumbled on unanswered question.
basically advocate using resource system when you're doing rapid ui development (qml) waiting resource file compile can irritation wanted copy files over.
what confusing here source/target mean different things. best way describe copy -> root
opposed copy -> here
my build wants resources "raw" on path copying folder->/
here's example of project file have:
folder_qml.source = qml folder_qml.target = / folder_js.source = js folder_js.target = / folder_img.source = img folder_img.target = / deploymentfolders += folder_qml folder_js folder_img
when build can verify output:
10:41:57: starting: "c:\qt\qt5.2.1\tools\mingw48_32\bin\mingw32-make.exe" c:/qt/qt5.2.1/tools/mingw48_32/bin/mingw32-make -f makefile.debug mingw32-make[1]: entering directory 'c:/development/subversion/mybuild-desktop_qt_5_2_1_mingw_32bit-debug' copying application data... 60 file(s) copied 12 file(s) copied 6 file(s) copied mingw32-make[1]: leaving directory 'c:/development/subversion/mybuild-desktop_qt_5_2_1_mingw_32bit-debug' copying application data... 60 file(s) copied 12 file(s) copied 6 file(s) copied 10:41:58: process "c:\qt\qt5.2.1\tools\mingw48_32\bin\mingw32-make.exe" exited normally.
the resulting build looks like:
/build dir/ + release + debug + qml + js + img makefile.release makefile.debug makefile
i hope helps answer question. didn't find documentation on played until worked. (it helpful mock-data tests).
Comments
Post a Comment