Pascaldietz (Talk | contribs) (created ModalDialog API Snapshot page) |
Pascaldietz (Talk | contribs) (removed private properties) |
||
| Line 39: | Line 39: | ||
;''row'' buttonRow | ;''row'' buttonRow | ||
:This property exposes the button row which holds the dialogs buttons. By setting both standard buttons invisible via showAcceptButton and showCancelButton you can add a custom row of buttons. Note that you have to call hide() and show() on your own then. | :This property exposes the button row which holds the dialogs buttons. By setting both standard buttons invisible via showAcceptButton and showCancelButton you can add a custom row of buttons. Note that you have to call hide() and show() on your own then. | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
=Signals= | =Signals= | ||
- | - | ||
Contents |
The ModalDialog component is the base component for message boxes and pickers.
-
-
AppPage {
id: myPage
// create ModalDialog:
ModalDialog {
id: myDialog
title : qsTr("Are you sure?")
buttonWidth: 200
buttonHeight: 35
showCancelButton: true
showAcceptButton: true
cancelButtonText: qsTr( "Yes" )
acceptButtonText: qsTr( "No" )
content: Rectangle {
id: myContent
width: 400
height: 400
color: "red"
}
// handle signals:
onAccepted: {
// do something
}
onRejected: {
// do something
}
}
// show on signal:
Component.onCompleted: {
myDialog.show()
}
}