Port to Windows Runtime kick-started

Published Friday February 15th, 2013 | by

With Windows 8, Microsoft introduced a new platform, the Windows Runtime. On the desktop, the operating system provides 2 modes:

Classic mode: This mode shows the familiar Windows desktop known from Windows 7 (with the exception of the start menu), in which traditional applications using the Win32 API run. No modifications are required for Qt 4 or Qt 5-based applications to run in this mode.

Modern UI (formerly known as Metro mode): This is a new type of user interface intended for tablet and phone UIs on which Windows Store Apps run. These applications use a new API called  Windows Runtime, which is based on the Component Object Model (COM). A similar API exists on Windows Phone 8.

Research work on how to port Qt 5 to use Windows Runtime was started by Andrew Knight from Digia and is visible in the winrt branch of the qtbase repository. Recently, further contributions by Kamil Trzciński were added to it (check out his blog). Now, with Qt 5.0 out of the door, we would like to kick off this platform port. This completes our cross-platform offering in addition to the ports for the widely used Android and iOS platforms.

We plan to continue development in this branch, aiming for as complete as possible port. Technical details can be found at here.

The first milestone is to get simple raster windows to be drawn on the screen. Later, we will investigate porting ANGLE to get OpenGL ES 2.0 support required for QML2.

Similar to the android branch, the idea is not to merge the branch, but later look at it and apply its changes to the dev branch.

To play with the branch, create an environment with a x86 MSVC2012 compiler and configure Qt with:

configure -nomake examples -nomake tests -developer-build -opensource -confirm-license -xplatform winrt-x86-msvc2012

We are also planning on creating a Qt Creator plugin to support deployment. Andrew Knight has already started on it in the winrt branch of his Qt Creator repository.

The work has still the “Research” status, so, we are not able to give any release dates yet. We aim to have something ready for the 5.2 release. However, since the development happens in the public winrt branch, the current state is always visible and it is easy to participate.

Contributions and help are warmly welcome.

Happy Hacking!

Did you like this? Share it:
Bookmark and Share

Posted in News, Qt, Windows

25 comments to Port to Windows Runtime kick-started

[...] 15, 2013 in News by admin Share it now!From blog.qt.digia.com: With Windows 8, Microsoft introduced a new platform, the Windows Runtime. On the desktop, the [...]

waddlesplash says:

Will the WinRT port support QtWidgets or just QML? I have some processing-intensive projects that I’d like to see get a native UI everywhere, but require too much CPU and power that they need to be in C++.

Kamil says:

For now there’s working QtWidgets port. QML requires more work. The whole ANGLE has to be rewritten to DirectX11.

Jens says:

waddlesplash: Remember that heavy processing can and should be done in C++ even if the UI is written using Qt Quick. While widgets will work, we will not be able to make native looking metro applications using them as they do not support the kind of transitions and animations that Metro UI would need. Qt Quick is on the other hand perfectly tailored for such IO’s. Widgets will of course work if you do not care about the application not looking like metro though.

krack says:

Great news ! I have one more question .. I know that WinRT applications have some limitations on use of I/O operations. Will QFile, QtNetwork, QAudioOutput/Input work as in normal Qt application ?

Kamil says:

Yes it should. Of course QFile will only work in context of Application, but the rest should work just fine. QThread and QThreadPool will also work, but with some limitation. As for now I haven’t seen methods to kill or terminate threads.

krack says:

And what with QThread and QThreadPool ?

Maurice Kalinowski says:

ThreadPool should be easier than QThread, as WinRT bases everything on thread pools. Threads themselves are not supported as such. There are a couple of examples available using thread pool to mimic thread behavior. We have to see how that works out.

Generally there are a lot of design decisions been done in WinRT which break with the “classic” behavior. For instance all file I/O is supposed to be asynchronous etc. However, there are standard implementations still available (fopen,…) to ease a port. We will still need to decide where to put the file engine on top.

[...] Анонсированы первые наработки проекта по портированию Qt для работы в оптимизированном для планшетов и телефонов режиме Metro платформы Windows 8, в котором в отличие от классического режима вместо Win32 API задействован новый WinRT API, основанный на компонентной объектной модели (COM). Одновременно ведётся работа по созданию плагина к Qt Creator для развёртывания Qt-приложений для платформы Windows 8 Metro. [...]

johnd says:

Windows surface pro tablets include a pressure sensitive pen. Does Qt support pen pressure access on a surface pro running windows 8?
What Qt api would be used to access it?
We use QTabletEvent right now for wacom pen and tablet support.
If QTabletEvent does not support the surface pro pressure pen, will that support be included in a future Qt release?
Or would QTouchEvent support it, since it includes pressure() in a touch point?

Wacom tablets use a wintab tablet driver. Surface pro does not ship with this driver. So if QTabletEvent just works off of wintab events, then it would not work with the surface pro pen.
It appears that software that supports the windows ink api (as opposed to wintab) is working with the pressure pen on surface pro. Also, there is the issue of some other windows pen based computers that use N-Trig technology not having wintab drivers (but apparently working with ink api).

Windows 8 also has a new pointer input message that supports pen pressure and tilt. These messages apparently integrate both touch and pen input.
So part of what i’m asking with this question is how much of this is currently supported by Qt. Is the only pressure modulation support in Qt on windows based on the wintab driver (which is how you would talk to an external wacom tablet)? Or is their also support internally in Qt for the ink api, or the new pointer input messages?

Many intel based windows 8 tablets include integrated pens. So we’d like to know how to code our existing Qt based graphics applications to support these new windows pen and tablet computer.

Maurice Kalinowski says:

@johnd Thanks for the very valuable input. We just initiated the port and hence try to get something running and working. Basically small iterative steps.

Hence we do not have an answer to your questions yet, but would like to come back to them when we have set the basics right. Feel free to create a item on bugreports, it is far easier to track status that way compared to blog comments.

And of course, contributios are always welcomed :)

roywillow says:

I tried tablet example of Qt5 and Qt4.8.4, both failed to work on Win8, on my fujitsu st5112(wacom pen touch screen). They just show nothing when I painted. But this example works find on Win7.
I got some information about Qt5 will drop support on wacom, is that so?

TheTrueDigia says:

Can’t believe you people still working for Digia? How are your slave masters going? Are they complaining they can’t make enough money with Qt? Time will come. You will all be fired.

Slartibart says:

Do trolls know they are trolls?

Henning says:

AFAIK normal Windows RT/Windows on ARM application will not be allowed to use APIs to run a just-in-time compiler. But V8 (the Webkit-JavaScript engine used in QML) is a JIT. So how will you solve this issue?

Maurice Kalinowski says:

This is an issue, which also needs to be addressed for other ports. As those will be done before a final WinRT port, we can check for their solutions and hopefully adopt the WinRT version to use similar approaches.

Hamed says:

I want android and IOS port; when I can port my ap on these ?

Tuukka Turunen says:

@Hamed: We are working hard to have something tangible with Qt 5.1 – not final, but something that you can already work with. Keep posted, there will be a lot of info coming in the next weeks and months.

zelo says:

Can anyone please port Tesseract OCR project and put it on Codeplex?

Apparently, this guy (http://stackoverflow.com/q/13900749/863980) is able to port zlib (one of the dependencies of Tesseract project) to OCR!! But the assembly code conversion (inflate_fast function) from x86 to ARM has not yet done for RT…

GOOGLE says:

Characteristic information with regard to powerful degree running have been rebalanced. In general, this means weakened whenever fine-tuned lower, more powerful while modified upwards. Advantages any time modified straight down happen to be improved to compensate. It is now possible to obtain your own degree of recover the cash from the level of opponent. GOOGLE http://www.google.com

Sup, I am selling my website. Check it out http://tiny.cc/6zxnuw

Special info says:

a friend recommend this to me, glad he did

Pedro says:

Happy you are doing this. Will there be a interface for sending content to live tiles?
http://msdn.microsoft.com/en-us/library/windows/apps/br208661.aspx

Maurice Kalinowski says:

Those are things we will investigate as soon as we have some mature basis.

seo vps says:

Improve your google rank today check this out! http://goo.gl/YzNKa

Commenting closed.