Qt 5.2 beta 1 - iOS - Why QtQuick.Controls 1.0 can't working ?
-
Hi everybody,
I installed the 5.2.0 beta for iOS (qt-mac-opensource-5.2.0-beta1-ios-x86_64-offline.dmg), and created a new project of Qt widgets Application. I use QtQuick 2.0 and a simple qml (inside an qrc) file to show a View; When the qml only contains the "Quick Basic" widgets, it display fine on iphone simulator(still TextIput can't be touched and no keyboard showing up), but when add "Quick Controls" widgets it display only blank on iphone simulator, can somebody tell me why?
main.cpp:
@
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}
@mainwindow.cpp:
@
#include "mainwindow.h"
MainWindow::MainWindow(QWindow *parent) :
QQuickView(parent)
{
setSource(QUrl("qrc:/main.qml"));
}
@main.qml:
@
import QtQuick 2.1
import QtQuick.Controls 1.0
Rectangle {
width: 220
height: 320
Text{
x: 80; y: 20
width: 100
height: 50
text: "qml test"
}TextEdit{ x: 80; y: 80 width: 180; height: 50 text: "TextEdit" } TextInput{ x: 80; y: 150 width: 180; height: 50 text: "TextInput" } Button{ x: 80; y: 200 width: 80; height: 50 text: "button" }
}
@if qml don't use QtQuick.Controls 1.0 and Button it will run fine on iphone simulator. I build the project like this:
- cd project directory
- run ios_x86 qmake, make
3.open the .xcodeproj with xcode, build and run with simulator