Modal dialog with Material Style bug with Qt5.15.0
Unsolved
QML and Qt Quick
-
When opening a dialog within a dialog and setting the second dialog as modal, and focusing any controller with a ToolTip it is possible to click controllers behind the modal overlay but only in the first dialog.
From what I've tested it is only an issue when using Material style.
import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 ApplicationWindow { id: window visible: true width: 640 height: 480 title: "Modal Error" RowLayout { Button { text: "Open dialog" onClicked: mainDialog.open() } CheckBox { text: "Click me 1" } } Dialog { id: mainDialog x: 50 y: 50 height: parent.height - 100 width: parent.width - 100 closePolicy: Popup.NoAutoClose standardButtons: Dialog.Close RowLayout { anchors.fill: parent Button { text: "Open Dialog" onClicked: dialog.open() } Item { Layout.fillWidth: true } CheckBox { text: "Click me 2" } } Dialog { id: dialog title: "Dialog" modal: true closePolicy: Popup.CloseOnEscape height: parent.height - 100 width: ( parent.width / 2 ) - 100 x: 50 y: 50 TextField { id: textField placeholderText: "Focus me" anchors.centerIn: parent ToolTip.text: "ToolTip" ToolTip.visible: textField.activeFocus } } } }
One workaround could be to set overlay to a pane to handle the mouse-click event. But I'm interested to find the root cause.
Dialog { id: dialog Overlay.modal: Pane { background: Item {} } }