Popup can be dismissed by clicking outside with a mouse but the same doesn't work with touch input.
-
I am using Qt 6.2.4 for creating a UI for the Raspberry Pi. I have used this document for creating the cross compile SDK: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi#With_Qt_Creator
import QtQuick import QtQuick.Controls 2.15 Window { width: screen.width height: screen.height visible: true title: qsTr("Hello World") Rectangle { id: homePage width: parent.width height: parent.height Button { id: testButton width: 40 height: 40 flat: false anchors { right: parent.right rightMargin: 25 verticalCenter: parent.verticalCenter } onClicked: testPopup.open() } Dialog { id: testPopup width: 150 height: 50 x: 1920 - 200 y: 100 background: Rectangle { width: parent.width height: parent.height color: "black" } } } }The above code creates a screen with a button on it. The Raspberry Pi has a touchscreen and a mouse connected to it. If I use the mouse to click on the button and open it, it opens the popup. A click outside the popup closes the popup. However, when the touchscreen is used, a touch outside the popup closes the popup only on the first time. All all subsequent tries, the popup cannot be dismissed with a touch outside. If I reload the UI then again this same patter can be seen. It dismisses the popup only on the first try.
There is a similar issue here: https://bugreports.qt.io/browse/QTBUG-103268
This above bug has been fixed, but the fix has been added to 6.4.1 and 6.5.0 Beta1.
I have the following questions:
- Will this fix be added to 6.2.4?
- If not, is there any way I can add this fix or backport this fix?
- Could someone please suggest a workaround for this issue?
- Could the reason for this issue be something other than this bug ?