I have a problem using MessageDialog. The following code:
import QtQuick 2.2
import QtQuick.Dialogs 1.1
.....
MessageDialog {
id: id_dialogDelete
title: qsTr("Warning");
icon: StandardIcon.Warning
text: qsTr("Are you sure?")
standardButtons: StandardButton.Yes | StandardButton.No
Component.onCompleted: visible = true
onYes: {
console.log("DELETE")
}
}
Triggers yes() signal two times and the result is:
DELETE
DELETE
What could be the problem?
↧