Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2
-
51d416cdfd909aacd5047632a7cc1661a158731a (qt/qtquickcontrols2/dev) 2f84f44840a38d2a2cb1b0e4ba6478f2e0946dbc (qt/qtquickcontrols2/6.0) 7e819a5777a0632175347688312da9cee0702177 (qt/tqtc-qtquickcontrols2/tqtc/lts-5.15)
-
UI Bug Fixing Q1/2021
Description
In attached project, press Esc to close the top most Dialog, then try to press the Button.
Somehow the exit transition leaves the overlay hanging.
import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Window 2.15 ApplicationWindow { id: mainWin width: 1000 height: 1000 visible: true title: qsTr("Hello World") Component { id: dlg Dialog { dim: true modal: true closePolicy: Popup.CloseOnEscape Column { Text { text: "button is " + (button.down ? "down":"up") } Button { id: button text: "Try to press this button" } } } } Component { id: brokenDlg Dialog { dim: true modal: true closePolicy: Popup.CloseOnEscape Text { text: "Press Esc key to reject this dialog" } exit: Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0 } } } } Component.onCompleted: { var d1 = dlg.createObject(mainWin, {visible:true, x: 290, y: 340}) var d2 = brokenDlg.createObject(mainWin, {visible:true, x: 300, y: 350}) d1.onRejected.connect(function func1(){ d1.destroy(); }) d2.onRejected.connect(function func1(){ d2.destroy(); }) } }