Time to relax. I am looking for sth interesting stuff around me or ........qt.
You may be interested about Qt Comes to QNX .Besides IOS,Android,WebOS,QNX,which one will be the next? Bada?!@$#@#$ no matter what happened yestoday or last-year,or what may or may not happen tomorrow.In a word, welcome to Qt family.
Follow the Instructions(check it out,http://wiki.qt-project. org/QNX), basically,no pain for you to port your qt app on the BlackBerry device(I should say at least PlayBook2 Simulator,cause no available playbook2 device for me by far :( ).
Here,I think there are still sth useful tips for people in need.
1. Remember to set corresponding qt for qnx(arm or x86) environment variable before compiling your qt app against qnx.
2. app resolution on the BlackBerry PlayBook2 is: 1024×600
3. ./configure-qsk x86 for simulator based app building ,
./configure-qsk arm a9 for device based app building
4. libraries (only are declared in pro file)and bin will be packaged together and deployed in
/accounts/1000/appdata/.
5. For Qml application,importing all the qml files and necessary data (images) in app's resource file,storing them in the app's executable so that you won't get into trouble with relative path any more if do it so.Otherwise setSource() or setMainQmlFile() for QtDeclarative can't load and parse qml file correctly if the given relative path was wrong.If your invoke this method by using default qmlapplicationviewer framework(load qml file in relative path ),little code change will be needed,As some post regarding tip here:
Just add
-e qml qml \
to the bar package section of the pro file and adjust the path to main.qml in main.cpp
viewer->setMainQmlFile(QLatin1String("app/native/qml//main.qml"));
5. For Qml application,importing all the qml files and necessary data (images) in app's resource file,storing them in the app's executable so that you won't get into trouble with relative path any more if do it so.Otherwise setSource() or setMainQmlFile() for QtDeclarative can't load and parse qml file correctly if the given relative path was wrong.If your invoke this method by using default qmlapplicationviewer framework(load qml file in relative path ),little code change will be needed,As some post regarding tip here:
Just add
-e qml qml \
to the bar package section of the pro file and adjust the path to main.qml in main.cpp
viewer->setMainQmlFile(QLatin1String("app/native/qml/
6. remember to explicit declare all the libraries app at runtime depends on in .pro like this. for GoalTime
...
-e $$[QT_INSTALL_LIBS]/libQtCore.-e $$[QT_INSTALL_LIBS]/libQtGui. so.4 lib/libQtGui.so.4 \
-e $$[QT_INSTALL_LIBS]/ libQtOpenGL.so.4 lib/libQtOpenGL.so.4 \
-e $$[QT_INSTALL_LIBS]/ libQtNetwork.so.4 lib/libQtNetwork.so.4 \
-e $$[QT_INSTALL_LIBS]/ libQtDeclarative.so.4 lib/libQtDeclarative.so.4 \
-e $$[QT_INSTALL_LIBS]/libQtSql. so.4 lib/libQtSql.so.4 \
-e $$[QT_INSTALL_LIBS]/libQtSvg. so.4 lib/libQtSvg.so.4 \
-e $$[QT_INSTALL_LIBS]/ libQtScript.so.4 lib/libQtScript.so.4 \
-e $$[QT_INSTALL_LIBS]/ libQtXmlPatterns.so.4 lib/libQtXmlPatterns.so.4 \
-e $$[QT_INSTALL_LIBS]/libQtXml. so.4 lib/libQtXml.so.4 \
...Even though nothing wrong on building, it will crash at startup sometimes when launching app on QNX(or at least on the simulator).The reason for this lies in one or more libraries are missing.As I metioned before,libraries which are only declared in pro file can be packaged with bin and deployed on simulator,I am not for sure if it's the same case happened on device(playbook2).
7.In case sth unexpected happened,there is still a way to figure it out.As document mentioned,
get stdout and stderr on the PlayBook:
$ cat /accounts/1000/appdata/The same to simulator.
PS:It seems like the libQtWebkit.so.4 library is missing........