Quantcast
Viewing latest article 6
Browse Latest Browse All 8

Initial success in porting Harmattan/Symbian QML app to BlackBerry (Jaffa@maemopeople)

This is the first post in a new BlackBerry category in my blog. Having attended the “BlackBerry 10 Dev Jam” in London last week, BB10 looks very interesting – and a spiritual successor to MeeGo 1.2 Harmattan, i.e. the Nokia N9.

It’s particularly interesting as BlackBerry have created their own Qt/QML-based environment, called Cascades.

However, I’ve got an existing app, Bedside which is almost pure QML. Could I get it running? More detailed instructions will come later, but here’s how I got to where I am:

  1. Install the BlackBerry 10 Native SDK and developer environment.
  2. Create a new BlackBerry Cascades C++ project, although we’re going to use it for “plain” Qt (as described in this Chinese blog post).
  3. Ensure you add to bar-descriptor.xml.
  4. Copy qmlapplicationviewer.{cpp,h} from the existing project into APP/src/.
  5. Put your QML resources in APP/assets/ (note you can’t use asset://... URLs within the QML files, as you can with Cascades).
  6. Replace main.cpp with a simplified version from your other project, for example:

#include 
#include 
#include "qmlapplicationviewer.h"

int main(int argc, char **argv) {
    QApplication app(argc, argv);
    QmlApplicationViewer viewer;

    viewer.setMainQmlFile("app/native/assets/main.qml");
    viewer.showFullScreen();

    return app.exec();
}

In particular, note the path to the main-QML-file.

And here’s the initial version of Bedside (with no screensaver interaction yet) running on the BlackBerry 10 Dev Alpha:

2012-06-19 22:17 UTC with score -2

Viewing latest article 6
Browse Latest Browse All 8

Trending Articles