Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.5, 6.4
-
None
-
-
90891916a4 (qt/qtdeclarative/dev)
Description
MouseAreas on top of ToolTips on top of another MouseArea is preventing unrelated Popups from closing when they should be. Here's a walk through of the issue via minimum reproducible example:
qmlonline.kde.org link:
https://tinyurl.com/yd9d2q78
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Button { id: button text: "First, click me" onClicked: { popup.open() tooltip.open() } Popup { id: popup x: parent.width y: parent.height closePolicy: Popup.CloseOnPressOutside background: Rectangle { color: "steelblue" } contentItem: Text { text: "I am a popup!" } } } Text { x: 10 y: 100 text: "Now Hover me" MouseArea { // If this MouseArea is removed, then everything works?? anchors.fill: parent hoverEnabled: true } ToolTip { id: tooltip x: 0 y: 0 closePolicy: Popup.NoAutoClose background: Rectangle { color: "grey" } contentItem: Text { text: "I am a tooltip, click me" MouseArea { id: popupMouseArea anchors.fill: parent onClicked: { popup2.open() } } } } } Popup { id: popup2 y: 75 background: Rectangle { color: "peachpuff" } contentItem: Text { text: "Why didn't the original popup close because of 'PressOnOutside'?" } } }
Attachments
Issue Links
- mentioned in
-
Page Loading...