← Back to team overview

ubuntu-phone team mailing list archive

Re: [Development] Starting with Ubuntu Phone, SDK and Qt/C++

 

Hello,

Thanks for your questions. I try to answer them to the extend of my knowledge :)

On 04/28/2014 09:24 AM, Rami Saarinen wrote:
Hello all,

First I must apologize if these questions have been asked many times before or if the information is readily available all over the net. I did try to search for answers, but all I got was some tedious manual process to get things rolling.

I have Ubuntu SDK installed along with an installation of Qt 5.2.1 and Android SDK & NDK. I have rooted my nexus 7 (older model) tablet and can now dualboot to Ubuntu Phone. I can connect the tablet to my PC and the SDK qtcreator will find it and does display its serial number. Developer mode is turned on.

So the questions is: what is required to create a Qt/QML/C++ application that can be run in Ubuntu Phone (on ARM processor)? The SDK does not come with ready Kits (other than the autodetected Android ones) and the "Build and deploy on Ubuntu Phone" does not seem to work.

I can create and run pure QtQuick and Html5 applications and run them on the tablet but I want to have the C++ backend too. Mainly because I promised to look at (and demo) Qt & Ubuntu Phone development and I already have a ready project with (very small) C++ backend. I intend to demo the project with desktop, Android and Ubuntu Phone environments. Desktop and Android are already covered so Ubuntu Phone remains to be checked.

I don't necessary need to create a publishable package, getting the app in the tablet and running it would be enough.

Thanks in advance,

Rami

For the desktop target the QtC has the Kits. Running a pure QML app on the device needs nothing else but hitting the Ctrl+F12 as you have figured out. The script behind this shortcut is the /usr/share/qtcreator/ubuntu/scripts/qtc_device_run_app provided by the qtcreator-plugin-ubuntu-common package. That command will execute the qmlscene on the device with a bunch of variable settings and parameters.

The on device build feature is limited to .deb packaging of platform level projects. That is hardly even needed for application development.

When your application is a QML/C++ project you need to first build in the click chroot. Click chroot you can create in the Options, Ubuntu tab.

The qmake (.pro) projects are not supported, so I suggest to stick to cmake projects. You can find a good template hen you create a new project. Please choose the "QML Extension Library + Tabbed UI"

If you have questions please ping me (bzoltan) or Benjamin (zbenjamin) on #ubuntu-app-devel IRC channel.

zoltan



Follow ups

References