Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.9
- import QtQuick.Controls 2.2
- import QtQuick.Layouts 1.3
- ApplicationWindow {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- header: Rectangle {
- color: "red"
- height: 80
- }
- Button {
- id: dialogButton
- text: "Click me!"
- onClicked: quitDialog.open()
- }
- Button {
- id: quitButton
- text: "Quit"
- onClicked: Qt.quit()
- anchors.left: dialogButton.right
- anchors.leftMargin: 10
- }
- Dialog {
- id: quitDialog
- width: 500
- height: 275
- modal: true
- x: (parent.width - width) / 2
- y: visible ? 0 : -height
- Behavior on y { NumberAnimation { easing.type: Easing.OutQuad } }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement