Using QtCreator to deploy and run a Qt application to a remote Linux device

QtCreator is a very flexible IDE and can really be adapted for a lot of things. I usually use it to develop mobile applications for Nokia N9 and BlackBerry 10, but it can be used for more generic tasks. In my case I wanted to be able to develop a Qt application using my desktop PC, deploy it and run on a remote (actually it’s on the same desk) Linux machine running Xubuntu.

Doing this is quite easy and you don’t need any specific plugin on QtCreator, but be sure to have at least version 2.6.x. Other than QtCreator you also need two Linux based PC (I used Ubuntu 12.10 for my development machine and Xubuntu 12.10 for the remote netbook) and an SSH account on the remote PC.

Add the remote device to QtCreator


To add the remote Linux device on QtCreator, use the Tools->Options menu and click on “Devices” item. At this point click on “Add” button and fill the fields using values similar to the screenshot. In particular specify a name for the device, the IP of the remote machine and a username and password that must already exist (I just created the user “andrea” on the Xubuntu machine and used the same password). I also had to set the timeout to 20 seconds, because I had some connection problems and the connection kept dropping after 10 seconds trying. To verify if everything is working fine, just click on Test button.

Add a specific Qt version


To write your application you may need a specific Qt version that is different from the one distributed by your Linux distribution. There’s no problem, QtCreator let you add different Qt versions without any conflict. In my case I installed the Qt5 version distributed by Canonical Qt5 Edgers Team
Once it’s installed, just click on “Add” button and select the qmake specific to the version you want to add (in my case it was in /opt/qt5/bin/qmake ).

Add a Qt Kit


QtCreator permits to add new Kit (development configurations) and these kits are used during project creation to specify what you want to target. In my example I added a new kit choosing an appropriate name “Qt5 Ubuntu”, the device type, the actual device previously configured and finally the Qt version that we added before. With a kit I have a complete “toolchain” that allow me to write applications for a particular device, with a specific Qt version.

Putting the pieces together

At this point you just have to create a new “Qt Quick 2” application, and select the new kit you just created instead of the “Desktop” one. Please note that there is a little problem that I haven’t fixed yet (but I’m working on it): if you create, for example, a project named “QtTest1” it will be deployed to the folder /opt/QtTest1/ on the remote machine. By default your user doesn’t have read+write permissions for that folder so I manualy created the folder and I gave a chmod 777 on it, just for testing. There are two possible ways to fix this: you could create a specific user that has read+write permissions on /opt/ or you could modify the deployment configuration to have the app deployed to the user /home (I will investigate on this possibility and I will write something in one of the next posts).

Final thoughts

What all of this could be useful for? Well, do 2+2 and you’ll easily guess 😉 In the next weeks I will post more specific informations and I will update everyone with my progresses. Any comment is welcome! If you want to contribute to this you’re welcome too of course.

CuteSoma ( client) ported to BlackBerry10

During these Christmas holidays I’ve ported the N9 version of CuteSoma to BlackBerry10 platform, thanks to the BB10 Alpha device that RIM gave to me and thanks in particular to my friend Cornelius Hald that helped me with porting.

The porting itself was quite easy after all: if you have a Qt application that uses MeeGo Qt components, you have to switch to Symbian components (they’re more portable and support higher resolutions) and to do it I suggest you follow the informations on this blog post

If you need more detailed informations about Symbian Qt Components, you can also read this nice blog post from Cornelius Hald

So, what’s the result of my porting? Well, first of all a couple of screenshots

IMG_00000004      IMG_00000005

And finally the source code:
The application will be published soon in the BlackBerry App World and you will have it available in time for the BlackBerry 10 launch!

Social Connect QML plugin: access Facebook, Twitter from your Qt/QML applications

Social Connect is a library written in Qt that allows applications to easily connect to services like Facebook and Twitter. Recently I had the opportunity to work on this library improving it and adding support for Instagram (work is still in progress but it’s almost finished).

The main features of this library are:

  • Out-of-the-box support for Facebook and Twitter
  • Integrated authentication implementation
  • Simplified common interface for all supported services
  • Provides interfaces for native API calls
  • Design enabling easy addition of new services e.g. LinkedIn

If you are writing an application that needs to access these services, this could be the library for you. It can be extended to support even other services like LinkedIn, Flickr etc… and I would like to invite people to contribute to the code. The library has been tested with Qt 4.8.1 on Ubuntu Linux 12.04 but it should be compatible with any other versions/platforms.

For more informations about getting started with the library, I suggest you to give a look at this page

Using QML qt-components with QtQNX for BlackBerry PlayBook

With BlackBerry PlayBook you can now use Qt libraries to develop your applications. The problem is that QML components are not available yet (they will be available with CascadesUI in the near future), but you can use Symbian qt-components to develop your application UI. This should also make the porting of an existing Symbian Qt application easier.

We suppose you have already built and installed QtQNX under this directory: ~/QtQNX/ARM/ (please change it matching the folder where you installed it).
At this point you have to get qt-components sources using this command:

git clone git:// qt-components

Now enter the directory you just checked and compile the components:

cd qt-components
./configure -symbian

Whend you complete all the previous operations, you’ll have two directories inside qt-components/imports, please copy them inside the QtQNX installation directory:

cp -R imports/Qt ~/QtQNX/ARM/imports/
cp -R imports/com ~/QtQNX/ARM/imports/

That’s all for now. In the next posts I’ll show you how to use these components, providing a small code example. In the mean time you can find more informations here

CuteSoma – worldwide downloads statistic for Nokia N9

CuteSoma ( client for Nokia N9) has been available for 4 months now and it’s the right time to publish some interesting statistics about downloads. First of all I didn’t expect so much interest and I wasn’t sure to have so many downloads, due to the fact that Nokia never advertised this device properly. But luckly lot of people don’t care about advertising and buy a product anyway if they know it’s one of the best available on the smartphone market.

I’m really happy to notice that the number of downloads is growing each month, this motivates me to continue with development (well… when my N950 comes back from Nokia, since I had to send it because it was broken).

I want to thank all the 3658 people that downloaded CuteSoma until now and all the people that are sending me their feedback, ideas and patches (yes Cornelius Hald, I’m talking about you 😀 ) you’re giving me a big opportunity to learn C++/Qt/QML.