Porting Qt Applications to BlackBerry 10 is Easier than Ever!

Cascades

Guest post from Eun-Kyung and Kizito – Ed.

TITLE_IMAGE

Qt developers and BlackBerry® 10 developers often ask the following questions:

What is the relationship between Cascades™ and Qt, and how do they interact with each other?

Cascades and Qt frameworks are two major frameworks available in BlackBerry 10 application development. From a high-level architectural point of view, you can say that Cascades sits on top of Qt modules as it is built, using the Qt application framework leveraging Qt object model, event model and threading model. This also uses QtCore, QtXML, QtSql, QtNetwork and QDeclarativeEngine for QML components. Both frameworks use standard C++, signals and slots in Qt for inter-object communication. However, Cascades uses own UI rendering engine and does NOT use any QtGui functionality, while Qt uses raster and the OpenGL graphics engine.

BlackBerry 10 supports BOTH Cascades and Qt

The key point here is that BlackBerry 10 supports BOTH Cascades and Qt frameworks. If you have developed an application using Qt framework for other platforms, you can deploy and run the application on BlackBerry 10 with the minimum effort of fixing a few compile and runtime issues. The downside of this approach is that your application may not have consistent look and feel with the BlackBerry 10 platform, nor have the best integration with the platform itself.

Cascades includes a set of core UI components and platform APIs to create interactive applications accessing the underlying features of the BlackBerry 10 platform. Cascades UI components are designed to have a consistent look and feel, and are optimized for BlackBerry 10 integration such as touch screen interactions. You can use Cascades Builder, the main development tool, for creating BlackBerry Native applications, which is built into the QNX Momentics IDE. The UI preview and the components view are specific features of Cascades Builder when editing QML. Cascades Builder is also integrated to access the BlackBerry platform features and services like audio/video, camera, Ad Service, app integration, BBM™ Social Platform, external data storage access, file system access, internationalization, location, payment service, PIM (Personal Information Management), push services, networking, notifications and sensors. To learn more about the Cascades framework, see Introduction to Cascades.

When porting a Qt application to BlackBerry 10, you can access the same subset of Qt APIs directly without using wrappers for BlackBerry 10. This is powerful and convenient for Qt developers and Qt applications. If you have any Qt applications using Qt APIs such as QGeoCoordinate or QSensor, the same APIs are available and accessible on BlackBerry 10. Currently, the subset of QtCore, QtNetwork, QtLocation, QtSensors, QtSql and QtXML modules are supported. You can check out our sample applications to learn more about these APIs.

Which Framework to Choose to Port your Qt Application?

We recommend that you choose Cascades framework if you are developing a native look-and-feel application on BlackBerry 10 and want to maximize the platform integration. If you are planning to develop an application with specific and customized GUIs, you can choose Qt framework. The decision has to be made before you start writing your application, however, since you can’t mix the UI components between Cascades and Qt. We will walk you through the porting tips based on the framework in the following section.

Basic Step-by-Step for porting a Qt application to BlackBerry 10

1. Set up the tool chains:

  • Download BlackBerry 10 SDK/NDK and Set up
  • If you choose to use Qt Creator, download and configure Qt Creator 2.6 for BlackBerry 10 development. This version is recommended since it has the full support for BlackBerry 10 development including BlackBerry® PlayBook™ tablet and QNX. In order to deploy an existing Qt application project in Qt Creator, you need to add the kit which you defined for BlackBerry 10 to your project. Read the configuration instructions.

2. Build the application. You will have to fix some make, compile, and linking issues.
3. Set up Package and Deployment by adding the application icon and/or splash screen.
4. Fix look and feel issues by adjusting resolutions, icons, windows or font sizes. You can use Cascades components, make your own customized QML components, or use Qt Quick or QWidgets.
5. Address platform specific runtime issues. If necessary, add BlackBerry Platform Services. Often, different platforms handle inputs differently. Test rotating and adjust orientation issues.
6. Add unique features to the BlackBerry 10 platform to add competiveness. You can apply device integrations like QtMobility Sensors, Native BlackBerry Platform Services and PPS APIs.
7. Submit to the BlackBerry App World™ storefront.
8. Start collecting your money!

If you’d like to learn more about porting Qt applications to BlackBerry 10, stay tuned. We are planning to dig deeper into this topic over the next blog post series.

Here are some Cascades, Qt and open-source related links:

Related Posts:

YouTube: BlackBerry Jam Session (JAM12): Porting Qt Applications to BlackBerry 10
Developing in Cascades
What’s up with Qt and the future of Cascades?

About EunKyung

Enterprise Solutions Manager at BlackBerry, @echotown

Join the conversation

Show comments Hide comments
+ -
  • http://genteblackberry.wordpress.com/2012/11/22/desarrolladores-rim-lanza-guias-de-blackberry-10-para-portar-aplicaciones-phonegap-juegos-android-apps-y-qt/ *DESARROLLADORES* RIM lanza Guias de BlackBerry 10 para portar aplicaciones PhoneGap, Juegos Android / Apps, y Qt | News Channel

    […] Portar aplicaciones Qt para BlackBerry 10 es más fácil que nunca! […]

  • http://devblog.blackberry.com/2012/11/writing-qt-apps-blackberry-10/ Writing Qt apps for the BlackBerry 10 platform | BlackBerry Developer Blog

    […] Porting Qt Applications to BlackBerry 10 is Easier than Ever […]

  • http://www.sdknews.com/qt/blackberry-qt-porting-program BlackBerry Qt Porting Program | SDK News

    […] Porting Qt Applications to BlackBerry 10 is Easier than Ever! […]

  • http://devblog.blackberry.com/2012/12/qt-developer-days/ RIM at Qt Developer Days – Santa Clara #QtDD12 | BlackBerry Developer Blog

    […] Porting Qt Applications to BlackBerry 10 is Easier than Ever! […]

  • http://www.sdknews.com/blackberry/blackberry-at-qt-developer-days-santa-clara-qtdd12 BlackBerry at Qt Developer Days – Santa Clara #QtDD12 | SDK News

    […] Porting Qt Applications to BlackBerry 10 is Easier than Ever! […]

  • http://blackberryphoneshop.info/2012/12/18/blackberry-at-qt-developer-days-%e2%80%93-santa-clara-qtdd12/ BlackBerry at Qt Developer Days – Santa Clara #QtDD12 | BlackBerry and Phone Shop

    […] Porting Qt Applications to BlackBerry 10 is Easier than Ever! […]

  • http://devblog.blackberry.com/2012/12/the-best-of-native-and-cascades-development-2012/ The Best of Native and Cascades Development 2012 | BlackBerry Developer Blog

    […] Qt to BlackBerry 10 – http://devblog.blackberry.com/2012/11/porting-qt-apps-to-blackberry-10/ […]

  • http://devblog.blackberry.com/2013/02/qt-porting-guide-blackberry-10/ Qt porting guide: a reference to help you bringing your Qt apps to BlackBerry 10 | BlackBerry Developer Blog

    […] BlackBerry Jam Session (JAM12): Porting Qt Applications to BlackBerry 10 Porting Qt Applications to BlackBerry 10 is Easier than Ever! Writing Qt apps for the BlackBerry 10 platform YouTube: QtDD12 – How Qt Helped RIM Build […]

  • http://www.cnbbdevgroup.com/cn/?p=8962 向BlackBerry 10移植Qt应用变得比以前更容易! | 中国黑莓开发网

    […] 1.工具链的安装: ·下载BlackBerry 10 SDK/NDK,进行安装。 ·如果用户选择使用Qt生成器,则下载、配置用于BlackBerry 10开发的Qt生成器2.6。之所以建议用户使用该版本,是因为它对BlackBerry 10开发提供全面支持,包括BlackBerry® PlayBook™表和QNX。为了在Qt生成器中配置现有的Qt应用项目,用户需要将自定义的BlackBerry 10工具包添加到项目中。请阅读配置说明。 2.应用程序的构建:用户需要解决生成、编译及链接问题。 3.通过添加应用程序图标与/或flash屏幕来设置软件包及配置。 4.通过调整分辨率、图标、窗口或字体大小来解决外观和风格问题。用户也可以使用Cascades组件来创建自定义的QML组件,使用Qt Quick或QWidgets。 5.解决具体平台的运行时间问题。如有必要,添加BlackBerry平台服务。通常,不同平台处理的输入不同。然后进行旋转测试,解决方向问题。 6.在BlackBerry 10平台中加入独特的功能,增强其竞争实力。用户可以使用QtMobility 传感器、本机BlackBerry 平台服务及PPS 应用程序编程接口等设备整合项目。 7.提交至BlackBerry App World™ Storefront。 8.开始收钱吧! 如果您想要了解关于向BlackBerry 10移植Qt应用的更多信息,敬请期待!我们会在后期的博客日志系列中继续深入探讨该主题。 转载自: http://blackberry.developer.csdn.net/article.html?arcid=2812342 原文链接:http://devblog.blackberry.com/2012/11/porting-qt-apps-to-blackberry-10/ […]

blog comments powered by Disqus