Problem : Show page from other Qml file
-
I defined a page in xxx.qml
@import QtQuick 1.0
import Qt.labs.components.native 1.0Page {
id: filePage
//property alias message: pageText.text
Text {
id: pageText
anchors.centerIn: parent
text: "Showed page"
font.pointSize: 25
color: "#3c3c0c"
}
}@When using,
@ MouseArea {
id: mouse_area2
anchors.fill: parentonClicked: { window.visible = false; window.pageStack.push(Qt.resolvedUrl("xxx.qml")) console.log("change page") } }@
But, I get error :
Error: Cannot assign QObject* to PageStack_QMLTYPE_18*Plz show me the bug!!