Tuesday, 19 June 2012

Initial success in porting Harmattan/Symbian QML app to BlackBerry

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:

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

UPDATE: With a bit more work, I've got a single source tree working: now I can deploy to Symbian, Maemo, Harmattan or BlackBerry 10 (using Qt SDK for the first three, and BB10 Native SDK for the latter).

7 comments:

That's fantastic! Glad to see you're up and running with the Dev Alpha so quickly! It looks great!

So that's all done in QML? How are you rendering the clock? Is it using a custom font, or are you actually drawing it? It looks very smooth in your pictures, looks like Qt is handling the increased DPI nicely.

Couple of notes:1) We haven't got a clear indication about whether or not QtGui will be included on BB10. Previous indications seemed to suggest we wouldn't, but as you've seen the Dev Alpha does come with it.2) The Symbian and Meego components all work fine on the PlayBook and Dev Alpha, since they're mostly QML. Even the C++ portions are easily cross-compiled.3) I'm personally working on QML files for Cascades-style controls for Qt-only developers to use in their apps.4) You should check out the BB-Py project, @BBPyProject. I think we have a lot of good samples you could steal... I mean use. :-D

@Wesley: This has had no changes, but it's just using Rectangle, Item and Image at the moment.

@HorizonXP: Thanks for the feedback. I think including QtGui would be sensible, as there are a number of games in Qt/QtQuick, where there's no need for any native-styled widgets. At the moment, it's a transparent image masking a coloured rectangle underneath, although @alterego did a proof-of-concept using no images to get the same (slightly glowing) effect.

@thp: Deployment on to the device is a case of:Turn on developer mode (is always off after a boot)Deploy debug tokens as a one-time setup task. Involves settings various device & keyring passwords.Connect to the device over wifi (buggy)Click Run as > BlackBerry C++ Application in Eclipse.IOW, it's very similar to Qt Creator. There are references to command line tools, but I haven't tried them yet. It'd be interesting to see if the tools could be used to build, deploy & run from within Qt Creator.