A native message/confirmation dialog with configurable buttons. More...
| Import Statement: | import Shotcut.Controls |
| Value | Button shown |
|---|---|
MessageDialog.Ok | OK |
MessageDialog.Yes | Yes |
MessageDialog.No | No |
MessageDialog.Cancel | Cancel |
Combine values with | to show multiple buttons.
import Shotcut.Controls as Shotcut Shotcut.MessageDialog { title: qsTr("Confirm") text: qsTr("Are you sure?") buttons: MessageDialog.Yes | MessageDialog.No onAccepted: doSomething() }
buttons : int |
A bitwise OR of StandardButtons values controlling which buttons appear.
text : string |
The message text displayed inside the dialog.
title : string |
The dialog window title.
accepted() |
Emitted when the user clicks an affirmative button (OK or Yes).
Note: The corresponding handler is onAccepted.
rejected() |
Emitted when the user clicks a negative button (No or Cancel) or closes the dialog.
Note: The corresponding handler is onRejected.
open() |