当前位置: 代码迷 >> Android >> Preview of Qt 五 for Android
  详细解决方案

Preview of Qt 五 for Android

热度:173   发布时间:2016-05-01 11:19:15.0
Preview of Qt 5 for Android
Preview of Qt 5 for Android

Published March 13, 2013 | By Eskil Abrahamsen Blomfeldt
The first commit in the effort to port Qt 4 to Android was on Christmas Day, 2009: “Android mkspecs and semaphore” by BogDan Vatra.
On January 22nd, 2010, he committed “A small step for Qt, a giant leap for android” with a working graphics system plugin and could actually run Qt applications on an Android device. He uploaded a video to celebrate.
On February 20th, 2011, he announced the first usable release of Qt 4 for Android, under the moniker of Necessitas.
For the past 3+ years, BogDan and others have been (and are still)developing Necessitas on their spare-time, and on November 8th, lastyear, BogDan agreed to take his work into Qt 5 and submit the port to the Qt Project.
He pushed the first version of Qt 5 for Android to a WIP branch onJanuary 4th, and recently we integrated into the “dev” branch, meaningthat it will become part of Qt 5.1 when it is released.
For this preliminary release, we are focusing on the developerexperience, working to enable Qt developers to easily run and test theirapplications on Android devices. While there’s nothing preventing youfrom deploying your app to an app store with Qt 5.1, we’re recommendingthat people wait until Qt 5.2 before they do that, as we’d like to putsome more work into improving that experience: Making more options forhow your app is deployed, adding more polish in general, and adding moresupport for Android APIs, both by allowing you to extend your app withJava code or by mapping them in C++ APIs, whichever makes the mostsense.
On to the demos!
To start off, here’s a video of the Qt 5 Cinematic Experience demorunning on (from left to right): a Nexus 4, an Asus Transformer PadTF300T and a Nexus 7. The Cinematic Experience demo has quickly becomeour demo of choice at events, because it nicely shows a lot of the newgraphical capabilities in Qt Quick 2, such as shader effects, particleeffects, the new PathAnimation as well as the hardware-acceleratedSceneGraph architecture underneath, which makes it possible to run allthis at 60 fps.

In addition to the core parts of Qt, we also support the QML mediaplayer APIs in QtMultimedia. Here’s a nice video player written by Andyin QML, with fragment shader effects on top of the video, running on anAsus Transformer TF300:

To show off multi-touch support, here’s a simple hand painting demorunning on a Nexus 4. This also shows the support for native menus:

The lowest Android API level supported by Qt 5 is API level 10, akaAndroid version 2.3.3. This means we can also have Qt apps running onreasonably priced devices, such as this Huawei Y100:

Here’s the overview of what we have right now:
  • Support for creating Qt Widgets and Qt Quick apps that run on Android devices.
  • Support for Android API level 10 (version 2.3.3) and up.
  • QML media player functionality in QtMultimedia.
  • A set of commonly used sensors in QtSensors.
  • Cross-platform features of Qt of course (including Qt Quick controls and QtGraphicalEffects.)
  • Developing and configuring apps in Qt Creator 2.7.
  • Deploying a test build to a device directly from Qt Creator.

In addition, we plan to soon support the possibility of distributingthe Qt libraries through the Ministro distribution tool, which allowsyou to share a set of Qt libraries across several apps on a device, andwhich will be the primary way of deploying apps with Qt 5.1. Other thanthat, this is all already available: Just check out the wikiforinstructions. Let us know if anything goes horribly wrong. We canusually be found in the #necessitas channel on the Freenode IRC servers.
What’s next, you ask? You can in fact help us decide! Both by reporting your bug findings and feature expectations to us, and by contributing your code. We will be working steadily on improving Qt 5 for Android, and would benefit greatly from your feedback. In the wiki,we are also compiling a list of devices where Qt has been verified torun. If you take the time to add devices you have tested to the listthere (as well as any issues you have found), it would very much beappreciated  
Finally: A big thanks to BogDan Vatra, Ray Donnelly and everyone elsewho has been contributing to the Necessitas project for the past years,as well as Qt 5 for Android in the past months. And thanks to everyonewho will contribute in the future.
  相关解决方案