import QtQuick 2.3 import QtQuick.Controls 1.2 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") property int currentCount: 0 menuBar: MenuBar { Menu { title: qsTr("File") MenuItem { text: qsTr("&Open") onTriggered: console.log("Open action triggered"); } MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } Column { TextField { id: runCount text: "1000" placeholderText: "Run count" } Button { id: runButton anchors.right: parent.right anchors.left: parent.left text: qsTr("Start test") onClicked: { currentCount = 0; loaderTimer.running = true; } } } Loader { anchors.fill: parent id: appLoader } Timer { id: loaderTimer interval: 1; running: false; repeat: true onTriggered: { currentCount = currentCount + 1; if (currentCount > parseInt(runCount.text)) { appLoader.visible = false; loaderTimer.running = false; } else { appLoader.visible = true; appLoader.setSource("") appLoader.setSource("Test1.qml") } } } }