• 15120阅读
  • 16回复

[转载]Preview of Qt 5 for Android [复制链接]

上一主题 下一主题
离线fanformylove
 
只看楼主 倒序阅读 楼主  发表于: 2013-03-14
原文:  http://blog.qt.digia.com/blog/2013/03/13/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.



注(2023-05-25 by XChinux):原文中的视频地址(http://blip.tv/bogdan-vatra/qt-tooltips-example-on-android-3140576)已失效,可以用下面地址:
https://www.videoproc.com/resource/what-happened-to-blip-tv.htm
离线gova
只看该作者 1楼 发表于: 2013-03-14
此帖必火,沙发留名!
离线hitler++

只看该作者 2楼 发表于: 2013-03-14
百闻不如一见,等了好几年终于出了个预览版本,现在缺乏小白鼠做实验,等beta版出了老衲就开始用
离线jeffreylee

只看该作者 3楼 发表于: 2013-03-14
加速发展,快速提高,Qt我看行
“对于这个预览版本,我们专注于开发人员的体验,努力使开发人员很容易的在Android设备上运行和测试他们的应用。虽然将Qt5.1应用程序部署到应用商店没有任何阻碍,但是我们建议您等Qt5.2发布再那样做,因为我们将要把更多的工作投入到改善开发者体验中:提供更多部署应用程序的选择,总体进一步完善,增加更多对Android API的支持——通过允许您用Java代码扩展应用或将其映射到C++API中,我们会做任何有意义的事情。”

Preview of Qt 5 for Androidposted by Thom Holwerda on Wed 13th Mar 2013 22:02 UTC, submitted by JRepin"For this preliminary release, we are focusing on the developer experience, working to enable Qt developers to easily run and test their applications on Android devices. While there'snothing preventing you from deploying your app to an app store with Qt 5.1, we're recommending that people wait until Qt 5.2 before they do that, as we'd like to put some more work into improving that experience: making more options for how your app is deployed, adding more polish in general, and adding more support for Android APIs, both by allowing you to extend your app with Java code or by mapping them in C++ APIs, whichever makes the most sense."
离线realfan

只看该作者 4楼 发表于: 2013-03-14
Qt势头正猛啊,加油!
离线uidab

只看该作者 5楼 发表于: 2013-03-14
回 楼主(fanformylove) 的帖子
快出来啊!!!!
有时候为了工作直接获得答案,而我却失去了思考的乐趣!


飘啊飘,何时能安居!
在线toby520

只看该作者 6楼 发表于: 2013-03-14
千呼万唤始出来,犹抱琵琶半遮面
QtQML多多指教开发社区 http://qtclub.heilqt.com
将QtCoding进行到底
关注移动互联网,关注金融
开发跨平台客户端,服务于金融行业
专业定制界面
群号:312125701   373955953(qml控件定做)
离线XChinux

只看该作者 7楼 发表于: 2013-03-14
一直没用过android手机,周围人用的很多。
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
离线duduqq

只看该作者 8楼 发表于: 2013-03-14
不错不错
离线hp_201111

只看该作者 9楼 发表于: 2013-03-14
可喜可贺, Qt 加油!
离线tingsung

只看该作者 10楼 发表于: 2013-03-14
顶起来!!!!!
离线roywillow

只看该作者 11楼 发表于: 2013-03-14
necessitas的alpha版本的时候试过,只能说qtwidget应用在安卓上很丑= =,而我又不会qml,算是过了一把小白鼠的瘾……
当时的版本对multimedia模块支持的很差,现在单独拿出来说似乎也是为了摆脱当时的阴影吧
不知道对于发布含有Qt库以外的第三方库的应用,有没有改善。当时为了替代multimedia用了openal soft,为了让程序意识到这个库的存在绕了好久
我觉得Qt5.0有种以测试版的水平发布正式版的赶脚,真真让不少用户当了一回隐性小白鼠呢……这次Qt5 Android不妨也试试这战略XD
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
离线stlf

只看该作者 12楼 发表于: 2013-03-15
Qt 5的Android版预览 by Liang Qi


原文链接:Eskil Abrahamsen Blomfeldt – Preview of Qt 5 for Android

迁移Qt 4到Android的第一个代码变更(commit)发生在2009年圣诞节,来自于BogDan Vatra的“Android mkspecs and semaphore”。

2010年1月22日,他在“A small step for Qt, a giant leap for android”(Qt的一小步,Android的大飞跃)中提交了一个可以工作的图形系统插件,并且可以在Android设备上真正运行Qt应用程序了。为此他上传了一个视频进行庆祝。

2011年2月20日,他在Necessitas中发布了第一个可用的Qt 4的Android版。

在此后的三年多时间里,BogDan和其他朋友一起(还在继续)利用业余时间开发Necessitas项目,并且在去年的11月8日,BogDan同意把他的这一工作带到Qt 5中并且将这一移植提交到了Qt Project中。

1月4日,他把Qt 5的Android版的第一个版本提交到一个WIP(正在工作中)分支,最近我们已经把它合并到“dev”分支,这也就是说它将会作为Qt 5.1的一部分发布。

对于这次预览发布,我们主要集中精力在开发人员体验方面,让开发人员可以很容易地在Android设备上运行和测试他们的应用程序。尽管您可以在应用程序商店中发布使用Qt 5.1版的应用程序,但是我们还是建议您等到Qt 5.2版的时候再这样做,因为我们希望投入更多精力来改善这一体验:对于如何部署应用程序提供更多选项,增加更多通用的优化,并且支持更多的Android API,同时允许您使用Java代码或者它们的C++ API映射来扩展您的应用程序,只要您喜欢。

演示程序来了!(译者注:某个地区的网友也许不能访问,原因众所周知。)

第一个是,Qt 5 Cinematic Experience演示程序在以下设备上运行(从左到右):Nexus 4、Asus Transformer Pad TF300T和Nexus 7。Qt 5 Cinematic Experience演示程序现在已经成为了我们在所有展会中的首选演示程序,因为它很好地演示了Qt Quick 2中很多新的图形能力,例如着色器效果(shader effects)、粒子效果(particle effects)和新的PathAnimation以及让60fps成为可能的底层硬件加速SceneGraph架构。

请点击查看视频

在Qt的核心部分之外,我们还支持了QtMultimedia中的QML媒体播放器API。这里是Andy用QML写的一个很不错的视频播放器,在视频之上使用了像素着色器效果,它运行在Asus Transformer TF300上:



请点击查看视频

让我们炫耀一下多点触摸支持,这里是一个运行在Nexus 4上的简单手指绘制演示程序。这里也显示了对于本地菜单的支持:



请点击查看视频

Qt 5中所支持的最低Android API等级是10,也就是Android 2.3.3。这也就是说Qt应用程序可以运行在像Huawei Y100这样价位的机器上:



请点击查看视频

这里是我们现在所完成的部分的一个概览:

    支持创建可以运行在Android设备上的Qt Widgets和Qt Quick应用程序
    支持Android API等级10(2.3.3版)及以上
    QtMultimedia中的QML媒体播放器功能
    QtSensors中的一套常用传感器
    当然还有Qt的一些跨平台特性(包括Qt Quick Controls和QtGraphicalEffects)
    在Qt Creator 2.7中开发和配置应用程序
    从Qt Creator中直接向设备部署一个测试构建

另外,我们将会在较短时间内完成使用Ministro发布工具发布Qt库,这将会允许您在一个设备上让多个应用程序共享一套Qt库,并且这也将是部署使用Qt 5.1的应用程序的主要方式。所有完成的工作这里都已经叙述完毕,大家可以查看我们的wiki来获得更多具体信息。如果哪里错了,请告知我们。您可以在Freenode IRC服务器的#necessitas频道找到我们。

您如果问,下一步呢?您可以帮助我们来做决定。您可以报告您发现的Bug以及您所期望的特性,也可以贡献您的代码。我们将继续完成对Qt 5的Android版的改进,与此同时我们也很期望您的反馈。在这个wiki中,我们还列举了我们验证过可以运行Qt应用程序的设备。如果您在测试之后,为这一列表增加了新的设备(当然还有您所发现的任何问题),我们将非常感激:)

最后:在此感谢BogDan Vatra、Ray Donnelly以及其他在过去几年中为Necessitas 项目作出贡献的朋友们,以及过去几个月中为Qt 5的Android版作出贡献的朋友们。当然也感谢以后将会为这个项目做贡献的每一个人。




离线jyiigpgf
只看该作者 13楼 发表于: 2013-03-15
necessitas项目,是个人做着玩玩的,不是官方的东西。

当时的版本对multimedia模块支持的很差,现在单独拿出来说似乎也是为了摆脱当时的阴影吧

这句话要斟酌一下吧。
离线hp_201111

只看该作者 14楼 发表于: 2013-03-15
回 13楼(jyiigpgf) 的帖子
到合适的时候 , 官方可以招安
离线roywillow

只看该作者 15楼 发表于: 2013-03-15
回 13楼(jyiigpgf) 的帖子
个人见解罢了,不过真的有很多人对于necessitas的multimedia模块的不完善失望,不过后来也出来了很多替代的方法
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
离线xsjqqq123

只看该作者 16楼 发表于: 2013-03-15
回 7楼(XChinux) 的帖子
安卓的确有它的优势,感觉用得不错……
快速回复
限100 字节
 
上一个 下一个