01-12-2013 01:30 PM - edited 01-12-2013 01:31 PM
Hey, i wanted to know if its possible to Port my Qt App to the Qnx Momentics IDE. I've been looking all over looking to find documentation or instuctions on how but can only find Qt Creator Porting information
Basically this is what i have
i have Ported the Qt App to QtCreator and have sucessfully got it running on the Dev Alpha
Now i want to:
1. Import/ Move the Qt App Over to the Qnx IDE
2. Then Remove the Qt UI and Rebuild the App UI in cascades while keeping the qt Back end
So can i keep the Qt back end and rebuild the UI in cascades ?
If so anoyone can point me documentation on how i can move the porject into Qnx Momentics.
NOTE: Im fully aware im not able to mix the Qt UI/GUI code with Cascades. i have to pick one or another. in this case i want to replace the Qt UI with cascades
Thanks in adavnce, happy Coding, and porting
Solved! Go to Solution.
01-12-2013 01:40 PM
01-12-2013 05:05 PM
01-12-2013 05:39 PM - edited 01-12-2013 05:42 PM
Yes, QDE is QNX Momentics IDE. I think it's easier to move them other way around:
Create a new project in Momentics, then move source files one by one from the old project into new one (except GUI-related classes). And then recreate the GUI.
About QT Creator / Cascades:
For setting up QT Creator follow the steps on the wiki:
I think you've already done that.
Then create a Qt Quick project (wiki describes this step).
After this remove all Qt Quick related functionality from project and add Cascades libraries to .pro file. This is how my project file looks like:
TEMPLATE = app # Please do not modify the following line. #include(qmlapplicationviewer/qmlapplicationviewer
.pri) # Additional import path used to resolve QML modules in Creator's code model QML_IMPORT_PATH = QT += declarative script xmlpatterns xml sql network svg INCLUDEPATH += src
# Workaround for autocompletion bug INCLUDEPATH += include include/cpp include/qt4/QtCore include/qt4/QtSql include/qt4/QtNetwork LIBS += -lbbcascades -lbbcascadesmultimedia -lbbdevice -lbbplatform -lbbpim -lbbdata -lbbcascadespickers -lbbsystem -lbbmultimedia # The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp \ ...other cpp files... OTHER_FILES += bar-descriptor.xml \ qml/main.qml HEADERS += \ ...header files...
Then update bar-descriptor.xml file. You can use Momentics-generated file as a template. Here's my bar-descriptor.xml (replace application name and paths):
<?xml version='1.0' encoding='utf-8' standalone='no'?> <qnx xmlns="http://www.qnx.com/schemas/application/1.0"> <id>com.mydomain</id> <name>Application Name</name> <versionNumber>1.0.0</versionNumber> <description>Application Description</description> <initialWindow> <systemChrome>none</systemChrome> <transparent>false</transparent> <autoOrients>true</autoOrients> <aspectRatio>portrait</aspectRatio> </initialWindow> <env value="app/native/imports" var="QML_IMPORT_PATH"/> <env value="app/native/plugins:/usr/lib/qt4/plugins" var="QT_PLUGIN_PATH"/> <env value="app/native/lib:/usr/lib/qt4/lib/" var="LD_LIBRARY_PATH"/> <action system="true">run_native</action> <asset path="MyApplication" type="Qnx/Elf" entry="true">MyApplication</asset> <asset path="%SRC_DIR%/qml">qml</asset> <asset path="%SRC_DIR%/assets">assets</asset> <icon> <image>assets/images/icons/applicationIcon114.png<
/image> </icon> <splashScreens> <image>assets/images/splash/portrait768x1280.jpg</ image> <image>assets/images/splash/portrait720x1280.jpg</ image> </splashScreens> </qnx>
After this try to build and deploy a simple Cascades project. If everything is ok, start moving files from your old project (file by file).
Autocompletion won't work initially. All Cascades and Qt classes will be underlined in red.
Wiki describes a few workarounds. The one I'm using is creating a symlink in your project folder to point to ndk include folder:
lrwxr-xr-x@ 1 user staff 55 Dec 15 19:23 include -> /Applications/bbndk/target_10_0_9_1673/qnx6/usr/in
Then add the following line to .pro file:
INCLUDEPATH += include include/cpp include/qt4/QtCore include/qt4/QtSql include/qt4/QtNetwork
Autocompletion should work after that. I'm using Qt Creator on MacOS, this may not apply to Windows version.