Table of Content
- Qt for BlackBerry
- Introduction
- QNX as a base OS for PlayBook OS and BlackBerry 10
- Using Qt with BlackBerry PlayBook OS
- Qt on BlackBerry 10
- Experimenting with Qt5 on BlackBerry 10
- Using Momentics, QtCreator or just "vi", "vim", "joe", etc
- Take a Look on the Cascades UI Framework
- Contacting Other Developers
- Getting Help
- Resources
Qt for BlackBerry
Introduction
Qt can be used to for application development for the new BlackBerry platforms. This includes the PlayBook devices running PlayBook OS as well as devices running the new BlackBerry 10 platform. This page is thought to serve as a landing for all those who are interested in developing with Qt on PlayBook OS and BlackBerry 10.
QNX as a base OS for PlayBook OS and BlackBerry 10
Compared to BlackBerry products running BlackBerry OS based on Java, PlayBook OS and BlackBerry 10 used QNX as their base OS and support native development in C and C++. Addtional system and platform specific API and services are provided on top of the standard QNX package. For more information see QNX Neutrino RTOS User’s Guide [developer.blackberry.com] and Getting Started with QNX Neutrino [developer.blackberry.com]. Qt has been ported on top of QNX and so can and will be used for QNX projects as well.
Qt Creator supports working with QNX Neutrino devices, see Setting up Qt Creator for QNX for details.
Using Qt with BlackBerry PlayBook OS
The PlayBook OS powers the BlackBerry PlayBook tablet products. It was a starting point in the development of BlackBerry 10. Research in Motion (RIM) in conjunction with KDAB engineers had ported Qt to the PlayBook OS. These were the first works to bring Qt to the new BlackBerry platforms which are now continued in RIM and in the Qt community. PlayBook OS does not include a Qt installation. An ealier version of Qt is integrated in the PlayBook NDK [developer.blackberry.com] only. Developers are supposed to include Qt libraries in the installation packages. Development of Qt for PlayBook OS continued over time and the Qt version in the NDK is became outdated. Today, developers could use Qt 4.8.3 [qt-project.org] as well as Qt 5 [qt-project.org] and make an own build with the toolchain included in the PlayBook NDK [developer.blackberry.com] to develop Qt applications for PlayBook.
The basic process is:
- Make sure that your PlayBook is running the latest 2.x version of the firmware by going to Settings->Software Updates->Check for Updates.
- Install the BlackBerry NDK [developer.blackberry.com] and set it up for the use with Qt.
- Build Qt 4.8.3 [qt-project.org]
- Configure infrastructure for signing and deploying your applications:
- Get your signing keys from: https://www.blackberry.com/SignedKeys/codesigning.html
- Open up a Blackberry NDK enviroment command prompt (on Linux run source bbndk-env.sh in a simple prompt)
- Register your signing keys:
- blackberry-signer -register -csjpin 123456 -storepass 123456 client-RDK-1234567.csj client-PBDT-1234567.csj
- Request debug token (replace the your_pin with your device pin code which can be found at Settings -> About -> Hardware -> PIN):
- blackberry-debugtokenrequest -storepass 123456 -devicepin <your_pin> debug_token.bar
- Install your debug token:
- blackberry-deploy -installDebugToken blackberry/debug_token.bar -device 192.168.0.99 -password [your_pin]
- You can check your token state at Settings -> Security -> Developer mode
- Do not forget to enable Developer Mode. Go to Settings->Security->Development Mode and toggle the switch to turn it on.
- Get coffee, do some hacking, get more coffee…
- Build and deploy your applications and required Qt libraries to the PlayBook, test
- The Blackberry Playbook does not includes the Qt libraries, so you need to package them to your application. Deploy_Qt4_based_app_to_BB_PB_usingQtCreator
- Submit your applcation to the BlackBerry AppWorld [appworld.blackberry.com]
- Get beer and pizza
For more detailed instrucutions please take a look on
- “Setting up BlackBerry NDK for Qt on PlayBook”: <ADD LINK HERE>
- How to build Qt4 with BlackBerry NDKs [qt-project.org]
Please note that 4.8.3 is the last Qt version supporting PlayBook OS 2.x. Qt 4.8.4 and later and Qt5 are supported on BlackBerry 10.
Qt on BlackBerry 10
Compared to Qt on PlayBook, a recent Qt4 version is integrated in the BlackBerry 10 firmware and NDK. Moreover, Qt is used as base of the Cascades UI framwork and by many pre-integrated BlackBerry 10 applications. There is no need to compile Qt for BlackBerry 10 if you use Gold NDK or later.
The basic process is:
- Download the BlackBerry 10 NDK from the BlackBerry developer website [developer.blackberry.com]
- Install the BlackBerry 10 NDK
- Download QtCreator 2.7 or later and configure it to use BlackBerry 10 NDK, see this article
- Get coffee, do some hacking, get some more coffee…
- Build and deploy your application, test
- Submit your applcation to the BlackBerry AppWorld [appworld.blackberry.com]
- Get rich
- Get caviar and champagne
Note, it is still possible to build your own version of Qt for BlackBerry 10, and deploy libraries with your application in the same manner how it works for PlayBook OS. This is an advanced step for BlackBerry 10. It is only needed if you participate in the Qt development and need to test your changes in Qt on a device.
Experimenting with Qt5 on BlackBerry 10
Qt5 is not supported on BlackBerry 10 yet, i.e. it is not included in the NDK, nor in the firmware. Qt5 for BlackBerry 10 is under development and will be provided some time in the future. You still can experiment with it today and even submit a Qt5 application to BlackBerry AppWorld [appworld.blackberry.com] if you add required libraries and the Qt5 QPA plugin to the installation package. See this page [qt-project.org] for more instructions.
Using Momentics, QtCreator or just “vi”, “vim”, “joe”, etc
BlackBerry 10 NDK includes Momentics IDE. It can be used for Qt development and is worth a look, since it provides many advanced profiling and debugging tools.
A special plugin in QtCreator (2.7 and later) tightly integrates a BlackBerry 10 NDK installation in the development workflow in QtCreator. This is the most comfortable way to start for all those who use QtCreator for regular development. Check see this article to learn how to get it.
Those who like to stay on the command line can use various command line tools too. See this article for more details
Take a Look on the Cascades UI Framework
The Cascades UI framework uses Qt and QML as base to provide a standard set of UI controls and other API tailored to the BlackBerry 10 platform. You can develop your application in C++ or QML. If you are curious, take a look on the Introduction to Cascades [developer.blackberry.com] article.
Contacting Other Developers
Consider joining the Qt BlackBerry and QNX [qt-project.org] group. This group has its own forum.
Getting Help
If you have any questions about Qt on BlackBerry, you can get help here:
- #qt-qnx IRC channel on http://freenode.net/
- BlackBerry Community Forums:
- Native Development [supportforums.blackberry.com]
- Cascades Development [supportforums.blackberry.com]
Resources
Tooling
- Using Qt Creator for Qt Development on BlackBerry 10
- Building_and_Deploying_Qt_Applications_to_the_Playbook
- Deploying_Qt_to_a_central_place_on_Blackberry_devices
- Remote_debugging_on_Blackberry_devices
- Building Qt4 for Blackberry
- Building Qt5 for Blackberry
Tips and Hints
Related BlackBerry Jam Talks
- Introduction to the BlackBerry 10 NDK – Developing a Native BlackBerry 10 App from Start to Finish [hosting.desire2learncapture.com]
- Introduction to Qt on BB10 [hosting.desire2learncapture.com]
- Performance and Debugging for Native Developers [hosting.desire2learncapture.com]
- Fundamentals of the Cascades UI Framework [hosting.desire2learncapture.com]
Related Community Projects
- KDE Blackberry Project [community.kde.org]

