1. 下载编译QT5.2源码
1.1 git clone git://gitorious.org/qt/qt5.git qt5.2
1.2 cd qt5.2
1.3 ./configure -xplatform macx-ios-clang -developer-build -opensource -confirm-license -nomake examples -nomake tests -release
1.5 make
如果编译过程中部分tool 和example无法编译通过, 打开对应模块的Makefile文件,找到qmake_all和qmake_first。把对应的***tool**和**example**注释掉。
编译完成后会在 qt5.2/qtbase/下生成 ios下的静态库。
2. 使用QT5.2
1.1 使用QT Create创建一个桌面工程(如Test)。编译运行,保证桌面程序没有错误。
1.2 cd Test; ../qt5.2/qtbase/bin/qmake; qamke工具会生成一个Test.xcodeproj工程。
1.3. open Test.xcodeproj。 打开xcode, 设置bundle id和code signing id。 运行。
3. 问题。
3.1 生成的xcode工程缺少Copy bundle resource phases。 需要在 Editor->Add build phase 中手动添加。否则生成的app无法手动设置程序图标。
3.2 TextInput存在BUG, 无法自动打开或者关闭键盘。 需要手动调用 Textinput. openSoftwareInputPanel和Textinput. closeSoftwareInputPanel手动打开和滚比。
3.3 qt5.2暂时不支持中文