Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save James-Hudson3010/deddde27b5275e48764448486495a611 to your computer and use it in GitHub Desktop.
Save James-Hudson3010/deddde27b5275e48764448486495a611 to your computer and use it in GitHub Desktop.
main.qml
import QtQuick 2.11
import QtQuick.Window 2.11
import QtQuick.Controls 2.4
import QtQml 2.11
ApplicationWindow {
id: main_window
visible: true
width: 800
height: 500
Item {
anchors.fill: parent
Timer {
id: theTimer
interval: 10000
running: false
repeat: false
onTriggered: {
console.log( "triggered" )
blockingPopup.close()
}
}
Popup {
id: blockingPopup
width: 300
height: 50
modal: true
focus: true
closePolicy: Popup.NoAutoClose
}
Button {
text: "Btn"
onClicked: {
console.log( "clicked" )
theTimer.start();
blockingPopup.open();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment