Comments, Code and Qt. Some words about the wonderful world of software engineering


Sunday evening fun: Windows Phone 7 styled progress indicator in QML

Posted by kypeli

I started a new coding hobby project today. But instead of actually getting very far with the productive part of the project I got side tracked on something fun I wanted to try out (don't you just love when that happens 🙂 That's not possible when coding at work...). I wanted to share this day's outcome with you. Let me introduce this humble video show casing a Windows Phone 7 styled loading indicator in QML 🙂 You can get the source code for this small thing (GPL licensed) from here:

Technorati Tags: , , ,


Porting MeeGo Qt Components apps to Symbian

Posted by kypeli

Of course I don't have all the answers to what needs to be done for any given MeeGo Qt Component based application to have it running on Symbian, but I think I have three general actions that need to be done when porting an app from MeeGo to Symbian; have it run with the resources, make the code compile and tweak the UI. Thanks to Symbian Annan both MeeGo and Symbian run Qt 4.7.4 with Qt Quick and Qt Components which is of course the reason why this kind of porting is even possible with a reasonable effort. As I wrote in my earlier blog post, even though both Symbian and MeeGo run Qt and Qt Components, it's not perfect. I think too much manual work still has to be done, but it's a reasonable effort and when you read through my hints, I think the tasks ahead become clearer.

Technorati Tags: , , , , ,


I passed the Nokia Certified Qt Specialist test

Posted by kypeli

I just have to put it out here; I am now a Nokia Certified Qt Specialist which means I have the right to use the logo below. I have no idea where I would use it in the future, so let's have it at least here on my blog 🙂 It's nice to be able to join the club of Qt experts. Under NDA I cannot speak about the test itself, but I can tell you that it had some tricky questions as well 🙂 But please instead poke me about any Qt question!

Technorati Tags: ,


A MeeGo developer’s endeavors to the Symbian Qt world

Posted by kypeli

I've been working with Qt for a while already and we all know what a great cross-platform framework it is. When Nokia bought Trolltech in 2008 it was clear that Nokia wanted to make Symbian development easier. However, the QWidget based toolkit would not fly on Symbian, or any other mobile platform for that matter, so Nokia built some mobile UI frameworks on Qt (and oh boy Nokia is good at building frameworks for everything. Everyone should have at least one framework, if not two. I could write another blog post about that...). But while people in Europe were fighting over their frameworks, it was not until the guys and gals in Brisbane came up with QML when everything changed. Qt could finally be cross platform again and in an elegant way! Symbian just isn't my cup of tea. But that doesn't prevent me from wanting to write something for Symbian if for nothing else other than being able to say I've done it. But just thinking of Symbian C++ or Avkon makes me feel sick. This has changed thanks to QML and especially Qt Components. Also Nokia has finally been able to put out a single SDK that I can just install, write Qt with, deploy the same code on any Qt-based Nokia mobile, publish in the Nokia Store and... Profit! Right? Well, my opportunity to find out came now thanks to my podcast application, Podcatcher for N9, that I've written for the Nokia N9 smartphone. It's has a MeeGo Harmattan Qt Components based UI with a Qt C++ middleware. These are my comments as a former MeeGo developer on the journey to the Qt world of Symbian.

Technorati Tags: , , , ,


Easy threading with QtConcurrent::run()

Posted by kypeli

The following scenario is probably familiar to you: you are doing some heavy computing or IO intensive things in your app, like accessing a database, the filesystem or reading data from the Internet, that blocks your UI thread which leads to that the UI freezes. If you are writing a Qt app then probably the first thing that comes to your mind is to subclass QThread and implement the run() method (although you should not do that). But before you do that, you should take a look at Qt Concurrent and what it can offer. There is a good chance that what you need is already provided by the Qt Concurrent framework.

How I added threads to my app in 20 minutes

In this post I want to show you how I added threaded database access to my small podcast application for MeeGo, Podcatcher for N9. The use case I had at hands was that I added automatic cleanup of podcast episodes to Podcatcher for N9, which required some heavy database and filesystem access. This is the (naive) code (in short) that I originally had when cleaning up podcast episodes: QList channels = m_channelsModel->channels(); foreach(PodcastChannel *channel, channels) { PodcastEpisodesModel *episodesModel = m_episodeModelFactory->episodesModel(channel->channelDbId()); episodesModel->cleanOldEpisodes(m_keepNumEpisodesSettings, m_autoDelUnplayedSettings); }

Technorati Tags: , , , ,