I do not see any way to achieve this using the current API MessageDialog, but I also assume that this is very platform specific and why it is hidden.
You can create your own dialog:
import QtQuick 2.3
import QtQuick.Window 2.0
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
Window {
width: 500
height: 500
visible: true
Dialog {
id: dialog
visible: true
contentItem: FocusScope {
Row {
anchors.bottom: parent.bottom
anchors.right: parent.right
Button {
text: "No"
isDefault: true
focus: true
onClicked: dialog.close()
}
Button {
text: "Yes"
}
}
}
}
}

source
share