原文:
http://blog.qt.digia.com/blog/2013/03/05/qt-for-ios-preview/ Qt for iOS Preview Published March 5, 2013 | By
Morten Johan SørvigWe are very excited to be able to bring Qt to anew platform. Qt for iOS is planned to be a supported part of Qt 5.2,scheduled for release late 2013. The scope of that release is notcompletely determined: available resources, platform/app storerestrictions and Qt legacy set constraints on the project. This blogoutlines the current plan.
Qt 5.1 will contain a preview – which was in fact merged last Friday.It’s also possible to take a look today by checking out the Qt sourcecode. See “Getting Started” for detailed instructions below.
Development and DeploymentDevelopment and especially deployment is done using Xcode. The supportedworkflow is to maintain a .pro file based project, export it to Xcode(and re-export when the project setup changes), and then build anddeploy using Xcode. Source code editing can as usual be done in anyeditor.
Qt 5 ArchitectureUnderstanding the level of support various Qt modules will get, requiresa brief detour into Qt 5 architecture. With Qt 5 there is now a commonAPI that all platforms implement (the Qt platform abstraction – QPA).Most of the Qt for iOS project work will happen here, and this is thecode base the team will support. The QPA layer powers both widgets andQML (1 and 2).
StylingThe Qt Mac style uses the HITheme API provided by OS X to drawnative-looking UI elements. There is no such API on iOS, which meanscreating a QiOSStyle similar to QMacStyle is
not possible.Cross-platform styles such as the new Fusion style will however beavailable. Future styling efforts will focus on controls for Qt Quick 2.
Qt Quick 2: JavaScript engines and JITQt Quick 2 uses the V8 javascript engine, which cannot be deployed oniOS due to policy and technical limitations related to V8′s use of ajust-in-time compiler. This means no Qt Quick 2 on iOS for the timebeing. We are aware of the problem and are working on a solution.
What works today- Widgets
- Graphics View
- Qt Quick 1
- OpenGL
- Touch events
- Orientation events
- ++

Qt5 Cinematic Experience by
QUIt Coding, ported to Qt Quick 1 and running on an iPad
Getting started- Homework: Setup Xcode for development (acquire certificates,configure devices). Test-deploy one of the standard Xcode app templates.Make sure you have Git installed.
- Clone qtbase
git clone git://gitorious.org/qt/qtbase.git qtbase-ios
cd qtbase-ios/
[Optional: git checkout ios for the development branch] - Build QtBase for either device or simulator. Note that unlike Qt 4, Qt 5 does not support multi-architecture builds.
/configure -xplatform unsupported/macx-ios-clang -developer-build -nomake examples -nomake tests -release [-sdk iphonesimulator]
make - Get the Simple Demo:
git clone git://github.com/msorvig/qt-ios-demo.git
cd qt-ios-demo
../qtbase-ios/bin/qmake
open qt-ios-demo.xcodeproj