当我从QQuickWidget调用Window类型的qml文件时,它不会绘制
我尝试绘制Item和Pane类型,没关系。 而且我设置了visible:对于Window类型为true,我不起作用
创建并填充:
QQuickWidget *mapquickWidget;
ui->mapquickWidget->setSource(QUrl("qrc:/QmlLabel.qml"));
我的qml文件:
import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Window 2.12
Window { //pane //item
id: win
SwipeView {
id: swipeView
anchors.fill: parent
currentIndex: tabBar.currentIndex
Page1Form {
}
Page2Form {
}
}
PageIndicator {
count: view.count
currentIndex: view.currentIndex
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
}
}
全部编译,但是QQuckWidget为Window类型为空