Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.10.1, 5.11.0
-
iOS 11
Nitrogen 6
Description
If a dialog appears while a MouseArea in a Drawer is still being pressed then it is not possible to interact with the MouseArea after closing the dialog. This appears to open happen with touch devices as it works fine when using the mouse.
In the example given, click on the first button, then on the new one that is presented, hold it down until the dialog is shown. Once the dialog is shown, then release and dismiss the dialog. Holding the original MouseArea again does not react anymore.
import QtQuick 2.8 import QtQuick.Controls 2.1 ApplicationWindow { id: window width: 600 height: 400 visible: true Rectangle { anchors.centerIn: parent width: 100 height: 100 color: "Red" MouseArea { anchors.fill: parent onClicked: drawer.open() } Text { anchors.centerIn: parent text: "Open Drawer" } } Drawer { id: drawer width: 0.66 * window.width height: window.height Rectangle { anchors.centerIn: parent width: 100 height: 100 color: "Blue" MouseArea { id: ma anchors.fill: parent onPressed: { console.log("Drawer Button - onPressed") timer.start() } onReleased: console.log("Drawer Button - onReleased") onClicked: console.log("Drawer Button - onClicked") onCanceled: console.log("Drawer Button - onCancelled") onPressAndHold: dialog.open() } Text { anchors.centerIn: parent text: "Open Dialog" } } } Timer { id: timer running: false repeat: false interval: 1000 onTriggered: dialog.open() } Dialog { id: dialog visible: false title: "Dialog Popup" modal: true contentItem: Rectangle { color: "Green" implicitWidth: 100 implicitHeight: 100 Text { text: "Close Dialog" anchors.centerIn: parent } MouseArea { anchors.fill: parent onClicked: dialog.accept() } } } }
Attachments
Issue Links
- relates to
-
QTBUG-69033 When starting to show a drawer on a touchscreen but letting go before it starts to appear on screen it will still act like it is visible
- Closed