import QtQuick 2.11 Rectangle { id:page2 width: parent.width height: parent.height color: "blue" Text { anchors.centerIn: parent text: "Page2 Test" } focus: true Keys.onPressed: { console.log("Loaded item captured: ", event.text); event.accepted = true; } /* function show(){ animationShow.running = true console.log("Loaded page2 show "); } function exit(){ //BreatheTestJs.exit = true animationExit.running = true //startStopButton.running = false //stopTimer.start() } //加载任务动画效果 NumberAnimation { id: animationShow target: page property: "x" from: page.x to: 0 duration: 500 } NumberAnimation { id: animationExit target: page property: "x" from: page.x to: 1024 duration: 500 } */ }