Skip to content

Instantly share code, notes, and snippets.

@webmaster128
Created November 7, 2014 13:48
Show Gist options
  • Select an option

  • Save webmaster128/c061b119a977174c6e8e to your computer and use it in GitHub Desktop.

Select an option

Save webmaster128/c061b119a977174c6e8e to your computer and use it in GitHub Desktop.
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Window 2.2
ApplicationWindow {
title: qsTr("Hello World")
width: 300
height: 300
Window {
id: childWindow
width: 200
height: 200
visible: true
Component.onCompleted: {
console.log("Check type of variable 'close' in Window scope", close)
}
onClosing: {
console.log("Window about to close …");
console.log("Check type of variable 'close' in onClosing scope", close)
console.log("Get accepted status:", close.accepted)
console.log("Set accepted status …")
close.accepted = false
console.log("Get accepted status:", close.accepted)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment