Qt5 on Windows Phone - Current State

It's been some time since my last post, today I'm posting again about the state of the Qt-framework on Windows Phone. Remember, Digia and the qt-project are currently working to port their famous C++ framework Qt to WinRT (= Windows Runtime). This port includes to targetting Windows 8 Apps on desktop machines and tablet (including Windows RT on ARM cpus) AND Windows Phone 8.

In december 2013, Digia presented a technology preview of the WinRT port [1]. During this time, only a few parts of the qtbase module worked. But on 27th feburary 2014, they released the Alpha of Qt5.3, with a testable version of the Qml/Quick modules on WinRT. At the same time, they released QtCreator 3.1 Beta, with an experimental version of a QtCreator-WinRT-plugin, which imply: you can develop apps for Windows Phone 8 with QtCreator. So I decided to give it another try!

First, I downloaded the Alpha sources on qt-project.org, but: don't do this! There are to many changes during that release, on the Qml module in Alpha stage is not usable on Winodws Phone. So, I got the current Qt source code from git, check out the stable branch and compiled it again!

I decided to run the "Hello World"-QtQuick-app from QtCreator on my Windows Phone 8 device. I created this project, but then switched to the command line. Running
qmake.exe -tp vc CONFIG+=windeployqt <your_project_file>.pro
will create a Visual Studio project.

Before building the solution, you have to do 2 things:

  1. Copy the folder QtQuick.2 from the path <path_to_qt>/qml into the project folder. The windeployqt tool can't handle this resources at this time, I think this will be fixed soon.
  2. Start the tool qtd3dservice and keep it running during your development. I tool is needed by the ANGLE library, because there is no runtime compiler for HLSL shader programs. The first time you start your app, you will see a small delay during compilation.
Finally, after experimenting and trying a bit, I challenged to run my first QtQuick-app on Windows Phone 8!! So here are some metrics:
  • the start-up process is really quick! Ok, right now, I just run some basic apps, but you're not noticing any difference to "normal" apps, I would say they are a little bit faster, because they are written in C++.
  • the size of the XAP file are bigger than apps written C#. A release build of a QtQuick-app (including QtCore, QtGui, QtNetwork, QtQml and QtQuick) has the size of 8MB (a debug build 12,2MB). That's ok!
So, it was a nice and interesting project to get things running. Thanks to Andrew Knight from Digia, for helping me to start developing with Qt for WP8!!
Now, I'm starting to develop my first WP8-Qt-app. It will be a reader app of the Qt blogs [2]. During this, I develop some WP8 controls, like the famous "Pivot" control. Hopefully, you can download the app when the final Qt5.3 will be released! 

PS: Here a quick screenshot of a HelloWorld-app, with WP8 "look and feel"!

[1] http://blog.qt.digia.com/blog/2013/12/12/qt-for-windows-runtime-technology-preview-released/
[2] http://planet.qt-project.org/


Beliebte Posts aus diesem Blog

Native Look-and-Feel on Windows 10 Mobile with Qt / QML

Building QtWebKit Technology Preview 5 from Sources