I have the following code in my main.qml
MessageDialog {
id: exitDialog
title: "Quit"
text: "Save before quitting?"
icon: StandardIcon.Question
standardButtons: StandardButton.Save| StandardButton.Discard | StandardButton.Cancel
onAccepted: {
...
}
onDiscard: Qt.quit()
}
However, the problem is that the buttons look closed to me without saving Cancel and last Save! The "Default" button is set as closed, without saving. I want my button order in the code to be supported, and also set to save by default. Does anyone encounter such problems? any suggestions?
I saw this answer.
How to set the default MessageDialog button in QML? but how to do it for standard buttons?
source
share