qmake

QT QML resource files do not recompile after changes

耗尽温柔 提交于 2019-12-01 16:20:38
I'm using QT 5.9.1 working on Mac OS. My project is mobile App with C++ logic and QML UI Layer. All QML files are included into qml.qrc file, so in my .pro file I have RESOURCES += qml.qrc Inside qml.qrc there is a list of all resource files I use in Project, such as pictures, icons and QML files, in QT Creator it's displayed OK: As you can see some QML files are located in ROOT path of qml.qrc when other files are in subfolders , e.g. "qrc:/Elements/". So problem is that whenether I make changes in Files that located in root of qml.qrc - they are normally recompiled when I press build,

Qt Cannot open include file: 'QPrinter'

☆樱花仙子☆ 提交于 2019-12-01 14:52:32
问题 I am new to Qt. Downloaded source code for a Qt application of SourceForge, and tried to build and run it. After working through a few similar problems by adding QT += statements to .pro files, I am stuck on this one: On attempting to build in Qt Creator, I get errors saying error: C1083: Cannot open include file: 'QPrinter': No such file or directory I tried adding QT += printsupport to the .pro file, cleaning, and rebuilding, but that gives this error Error: dependent '..\..\..\..\..\..\..\

Qt pro file call another makefile

你。 提交于 2019-12-01 09:08:55
Is there a way to use the .pro file in Qt to call another Makefile? For example, in a makefile, you could use: make -f /other/path/Makefile Is there anything like using the pro file for Qt? Something like this should work: QMAKE_EXTRA_TARGETS += other PRE_TARGETDEPS += other other.commands = make -f /other/path/Makefile this will cause make -f /other/path/Makefile to be called as part of the make process, and will also give you the ability to type make other to just run that command. 来源: https://stackoverflow.com/questions/10488458/qt-pro-file-call-another-makefile

PRECOMPILED HEADERS not working in debug build with Qt Creator / qmake / MinGw

。_饼干妹妹 提交于 2019-12-01 07:07:47
In Qt Creator, I have a pro file using PRECOMPILED HEADERS. The build works just perfect when I build in Release mode. But building in Debug mode gives errors, generating object files failing. Example: 17:12:40: Running steps for project Euclide... 17:12:40: Configuration unchanged, skipping qmake step. 17:12:40: Starting: "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe" C:\Qt\5.2.0\mingw48_32\bin\qmake.exe -spec win32-g++ CONFIG+=debug -o Makefile ..\euclide\Euclide.pro C:/Qt/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'C:/UserPrograms/Euclide/build' g

qmake and multiple MSVS versions

被刻印的时光 ゝ 提交于 2019-12-01 06:37:40
From Visual Studio 2008 Command Prompt I run this command to generate .vcproj file: >qmake -spec win32-msvc2008 And get a warning message: WARNING: Generator: MSVC.NET: Found more than one version of Visual Studio in your path! Fallback to lowest version (MSVC.NET 2008 (9.0), MSVC.NET 2008 Express Edition (9.0), MSVC.NET 2005 (8.0), MSVC.NET 2008 (9.0) in path, MSVC.NET 2008 Express Edition (9.0) in path) For this project I use MSVS 2008 Professional. Actually the generated .vcproj file works well, but what is the warning message about? I removed all references of the older version of Visual

Build a JNI DLL using MINGW

时光毁灭记忆、已成空白 提交于 2019-12-01 06:36:13
I am trying to create a DLL that will call Qt (currently I can't use Jambi for the functionality I need). I have a simple Java method: public final native int createChild(int handle); I created C project in Visual Studio Express 2010 and was able to build the DLL. Then I created a project in Qt creator and moved my sources there. I tried to configure the build to a best of my knowledge but all I get is: java.lang.UnsatisfiedLinkError: tools.proofofconcept.control.EmbedderComposite.createChild(I)I My guess is that symbol is not properly exported from DLL. I added -D_JNI_IMPLEMENTATION_ linker

QMake CONFIG() function and 'active configuration'

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 06:05:51
While reading through the documentation for Qt 5.1, and specifically qmake, I was stumped by the explanation given in the documentation for the qmake CONFIG() function. I completely understood the one-argument version of the function, but the two-argument version makes absolutely no sense to me. I think my confusion is coming from the lack of a definition for 'active config' since the Qt 5.1 documentation says the following: This function can be used to test for variables placed into the CONFIG variable. This is the same as scopes, but has the added advantage that a second parameter can be

qmake and multiple MSVS versions

霸气de小男生 提交于 2019-12-01 06:03:39
问题 From Visual Studio 2008 Command Prompt I run this command to generate .vcproj file: >qmake -spec win32-msvc2008 And get a warning message: WARNING: Generator: MSVC.NET: Found more than one version of Visual Studio in your path! Fallback to lowest version (MSVC.NET 2008 (9.0), MSVC.NET 2008 Express Edition (9.0), MSVC.NET 2005 (8.0), MSVC.NET 2008 (9.0) in path, MSVC.NET 2008 Express Edition (9.0) in path) For this project I use MSVS 2008 Professional. Actually the generated .vcproj file works

Qt how to open a file in current dir ? or what's wrong with this?

安稳与你 提交于 2019-12-01 05:27:53
I'm trying to open an xml file in the current location of the executable QString path = QDir::currentPath(); path.append("/acc.xml"); QFile file(path); if(!file.open(QIODevice::ReadOnly)) { insertItem("IO ERR"); } When I run it from Qt creator, everything works. currentPath() returns the path to the executable's folder When I go to project-build-desktop/ folder and try to run it manually currentPath() returns /home/user/Documents EDIT also tried with same results: Qt::current().path(); Qt::current().absolutePath(); Johnny Try to use QCoreApplication::applicationDirPath() instead of QDir:

How to pass a cmd-command output to a #DEFINE MACRO in QMake

家住魔仙堡 提交于 2019-12-01 04:30:45
问题 I added a new #DEFINE to my ".pro" file like this: #DEFINE += SVN_V now I would like to pass the output of the command "svnversion -n" to this SVN_V , and here is what I did: #DEFINE += "SVN_V = svnversion -n" but the result is error: no such file or directory error: svnversion: no such file or directory so, what am I missing here exactly? (Be aware I am working with Linux Ubuntu) 回答1: It could be something like that: DEFINES += "SVN_V=\"\\\"$$system(svnversion -n)\\\"\"" $$system() is a