Getting a .pro file to work for both Visual Studio 2008 and Qt Creator
-
The .pro file:
@# Add more folders to ship with the application, here
folder_01.source = qml/SalesCenter
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
Avoid auto screen rotation
#DEFINES += ORIENTATIONLOCK
Needs to be defined for Symbian
QT += sql
CONFIG += debug_and_release
DEFINES += QT_LARGEILE_SUPPORT QT_SQL_LIB _USE_32BIT_TIME_T NETWORKACCESS
QTPLUGIN += qjpeg
INCLUDEPATH += ./../../../../include ./GeneratedFiles .
PRECOMPILED_HEADER = stdafx.h
UI_DIR += ./GeneratedFiles
RCC_DIR += ./GeneratedFilesCONFIG(debug, debug|release) {
DESTDIR = ../Debug
LIBS += -L../Debug
OBJECTS_DIR += Debug
MOC_DIR += ./GeneratedFiles/Debug
INCLUDEPATH += ./GeneratedFiles/Debug
} else {
DESTDIR = ../Release
LIBS += -L../Release
OBJECTS_DIR += Release
MOC_DIR += ./GeneratedFiles/Release
INCLUDEPATH += ./GeneratedFiles/Release
}symbian:TARGET.UID3 = 0xE46A320F
Smart Installer package's UID
This UID is from the protected range
and therefore the package will fail to install if self-signed
By default qmake uses the unprotected range value if unprotected UID is defined for the application
and 0x2002CCCF value if protected UID is given to the application
#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
Define QMLJSDEBUGGER to allow debugging of QML in debug builds
(This might significantly increase build time)
DEFINES += QMLJSDEBUGGER
If your application uses the Qt Mobility libraries, uncomment
the following lines and add the respective components to the
MOBILITY variable.
CONFIG += mobility
MOBILITY +=
The .cpp file which was generated for your project. Feel free to hack it.
Please do not modify the following two lines. Required for deployment.
include(qmlapplicationviewer/qmlapplicationviewer.pri)
qtcAddDeployment()include(SalesCenter.pri)@
-
Do you get the error during opening or compilation?
-
compilation
-
Sorry, where is the actual error in that output? I only see a couple of warnings.
There is a undocumented qgetenv in the QtCore/QtGlobal header by the way:-)
-
Why is it sometime folks cannot see the obvious! It is working fine, the error message I get from running it is my applications obscure message that the correct command line parameters where not passed in. Now to figure out how to set command line options for debugging!
-
For QtCreator:
Go to Projects --> run settings --> add the parameters you need :-)
For MSVS
Go To vcproj properties --> debug --> add the command line parameters
-
Gerolf, maybe it is funny, but after several months developing on Qt, few days ago I have started to write a command line tool and it took me several hours to find this setting in Qt Creator... :)
-
I also looked longer for those options the first time. also how to change the project build parameters :-)
-
[quote author="scarleton" date="1292697100"]Why is it sometime folks cannot see the obvious! It is working fine, the error message I get from running it is my applications obscure message that the correct command line parameters where not passed in. Now to figure out how to set command line options for debugging![/quote]
Sorry, I cannot see any kind of error message. At worst some compiler warnings.
-
Scarleton, VCsala: Any ideas for a better place to put those settings? I thought the place they are now is rather obvious...
-
After all it is obvious, it was my fault, as I was developing in different environments for years and it took some time to regain my aquaintance with these kind of IDE tools.
-
[quote author="Tobias Hunger" date="1292707921"]Scarleton, VCsala: Any ideas for a better place to put those settings? I thought the place they are now is rather obvious...[/quote]Once I started to really look for it, it was obvious. But then I am coming from the Visual Studio world. The very first place I looked for it was by right clicking on the very root of the solution tree and looked for Project Settings.
What would be cool is if that option exists and when the user clicked on it that way, the <Projects> button on the left would flash as it became active to draw folks attention to it. Hopefully one or two times folks would get with the program.
Sam
-
That's right for us MSVS people. But how is it for KDE or other IDEs?
Personally, I like context menus and options there and it could help to have an additional entry forwarding to the projects page, yes. -
scarleton: I actually like that idea:-) I'll look into it once I find some time to do so. I am currently a bit busy refactoring some code and want to get that done first.
Maybe you could file your suggestion in our "issue tracker":http://bugreports.qt.nokia.com/ so it won't be forgotten?
-
[quote author="Gerolf Reinwardt" date="1292747656"]Personally, I like context menus and options there and it could help to have an additional entry forwarding to the projects page, yes.[/quote]
Exactly, this is what I missed at the beginning, right clicking on a project and reach all related properties.
-
+1 for a menu entry "Go to project settings" which does switch to the project view of creator and switches there to the currently selected project.
-
Create an entry in the bug tracker and vote for it instead of going "+1" here...
-
Tobias Hunger, I do it. Link: http://bugreports.qt.nokia.com/browse/QTCREATORBUG-3419
-
ok, voted for it.
-
I have voted on it.