A friend of mine (@jan_ekholm/twitter and chakie/@freenode) developed a cool C++ VideoWidget using Qt a some time ago. The idea of making this kind of own custom widget, was that Qt’s multimedia isn’t the best multimedia kit on earth. The problem is that it’s not really a cross platform because it depends on underlying platform multimedia kit. For example on linux it may depend on streamer or phonon backend, on Windows it depends on DirectShow and on Mac on QuickTime. This also means that something that works on one platform, may not work on another platform.
One weird thing about Qt’s multimedia is that QML bindings are provided only by Qt Mobility’s multimedia module. Then again Phonon isn’t very efficient and it doesn’t have QML bindings. If using VLC with Qt, it’s almost impossible to make overlays (text) visible on a video. So Chakie made a solution, which doesn’t depend any of these, is a cross platform (Windows, Mac, Linux) and works quite nicely.
I thought that it would be great to port that QWidget/C++ based solution to QML. Actually, it was quite straight forward to do that, thanks to Chakie’s original solution, it took only a few hours to get the first version to work. Of course, fine tuning takes time, but it didn’t really take more than two hours to make the QML extension to show a video.
I thought, that it could be a good idea to write a short post how to port an existing Qt4 QML application to Qt5. At first, if you are not familiar how Qt will change for the next version, you should read this doc: The Road to Qt 5. The one of the biggest changes is happening under to hood of QML / QtDeclarative module. As Lars Knoll, wrote in the document, there is a new scene graph, which will replace the old QGraphicsView/QPainter based implementation. So basically what this means is that the gap between QML and HW gets smaller. In other words, in Qt5 you will get a kick ass performance for your QML applications plus extra features like shaders. Yes, you can also use shaders in your QML code!
Looks like HTML5 is the next buzz technology that every software consultancy company is desperately trying add their competence list. For some reason, it’s something that is predicted and announced to be in the next generation mobile devices. For example Tizen is said to support HTML5 and Samsung Bada mobile OS’s SDK/IDE already provides project templates to create HTML5 mobile apps. In addition to all this, web is full of different frameworks, which provide ways to build HTML5 based applications. I think one of the biggest expectations is that HTML5 is the “real cross platform technology for mobile application development”. Unfortunaly, I disagree.
But as I said, I’m not a web developer. It might be that I just haven’t seen a well structured web site or my inner resistance is just too much to let me to learn these technologies well enough.
I just wanted to tell to the world that next Monday I’ll be heading to the Qt Developer Days in Munich. Last year it was awesome event and I hope it reaches to the same level this year. I’m also very interested in to see d-pointer’s two applications QuickFlickr and Podcatcher in a Qt demo pavilion hosted by Nokia. There is also an embassy area for Qt Ambassadors, so I’ll be hanging around there to meet other Ambassadors.
It was February 2010 when I started my experimental project how to use QML and C++ together in a same application. At that time, there wasn’t too much information and examples how you should integrate e.g. C++ backend to QML UI. Remember that Qt Quick was released about 6 months after I started my project so it was lacking quite a lot documentation back then. The QML API was constantly changing too, not any big changes, but still enough to cause me headache.
My original idea was that it would be nice to make a client application for Flickr. In the first phase, I started to look for Qt based Flickr API and I found a simple Flickr API called QtFlickr. In the next phase, I wrote a simple wrapper on top of QtFlickr, which was exposed to QML side. The first UIs were quite rough and basically I was only trying to show what ever content from Flickr. Here’s an old video of the one of the first UIs of the QuickFlickr.
I have rewritten QuickFlickr UI many times during this journey. Mostly because, I found that it was so easy to prototype and try different things with QML. I think, when I ran the first versions of QuickFlickr on N900 and N8, I started to realize how I would like the UI to look and act like. QuickFlickr has been unofficially released (for testing) couple of times and I’ve got really valuable feedback from many users.
Btw, one interesting fact is that there are over 600 authenticated QuickFlickr Symbian^3 and Maemo5 users even though it hasn’t been officially released to any of those devices yet.