16,201
社区成员
发帖
与我相关
我的任务
分享
import QtQuick 2.5
Rectangle {
x: 0
y: 0
width: 300
height: 200
color: "steelblue"
Text {
id: text1
x: 0
y: 35
text: qsTr("Text")
font.pixelSize: 12
}
FocusScope {
focus: true
TextEdit {
id: textEdit1
x: 0
y: 58
width: 80
height: 20
text: qsTr("Text Edit")
font.pixelSize: 12
}
}
TextInput {
id: textInput1
x: 0
y: 90
width: 80
height: 20
text: qsTr("Text Input")
font.pixelSize: 12
}
}
QtFirst::QtFirst(QWidget *parent) : QMainWindow(parent)
{
ui.setupUi(this);
QQuickView *QuickView = new QQuickView(QUrl("qrc:/qml/main.qml"));
QWidget *ViewContainer = this->createWindowContainer(QuickView, this);
ViewContainer->setGeometry(0, 0, 300, 200);
}