Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.8.0
-
None
-
Mageia Linux Cauldron x86_64, Plasma 5.8
Description
Consider the following example:
CustomDialog.qml
import QtQuick.Controls 2.1 Dialog { standardButtons: Dialog.Ok | Dialog.Cancel Label { text: "Test text" } }
main.qml
import QtQuick 2.7 import QtQuick.Controls 2.1 ApplicationWindow { visible: true width: 640 height: 480 Button { anchors.centerIn: parent text: "Open dialog" onClicked: dialog.open() CustomDialog { id: dialog x: (parent.width - width) / 2 y: (parent.height - height) / 2 // standardButtons: Dialog.NoButton footer: DialogButtonBox { standardButtons: DialogButtonBox.Save | DialogButtonBox.Cancel } } } }
As a result, dialog has "Ok" button, instead of the "Save".
Setting in the dialog standardButtons: Dialog.NoButton is a workaround.