标签:1.0 quick pre fill property cti -- mouse hang
main.qml ------------------------------------ import QtQuick 1.0 Item { property bool isFirst : false; width: 200 height: 200 Loader { id: pageLoader } MouseArea { anchors.fill: parent onClicked: changePage(); } function changePage() { if(isFirst) { pageLoader.source = "Page1.qml" } else { pageLoader.source = "Page2.qml" } isFirst = !isFirst; } } Page1.qml ------------------------------------- import QtQuick 1.0 Rectangle { width: 100 height: 62 Text { anchors.centerIn: parent text: "Page1 Test" } } Page2.qml --------------------------------------- import QtQuick 1.0 Rectangle { width: 100 height: 62 Text { anchors.centerIn: parent text: "Page1 Test" } }
标签:1.0 quick pre fill property cti -- mouse hang
原文地址:http://www.cnblogs.com/ahmcdyf/p/6567405.html