<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Popup can be dismissed by clicking outside with a mouse but the same doesn&#x27;t work with touch input.]]></title><description><![CDATA[<p dir="auto">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: <a href="https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi#With_Qt_Creator" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi#With_Qt_Creator</a></p>
<pre><code>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"
            }
        }
    }
}

</code></pre>
<p dir="auto">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.</p>
<p dir="auto">There is a similar issue here: <a href="https://bugreports.qt.io/browse/QTBUG-103268" target="_blank" rel="noopener noreferrer nofollow ugc">https://bugreports.qt.io/browse/QTBUG-103268</a></p>
<p dir="auto">This above bug has been fixed, but the fix has been added to <em>6.4.1 and 6.5.0 Beta1</em>.</p>
<p dir="auto">I have the following questions:</p>
<ol>
<li>Will this fix be added to 6.2.4?</li>
<li>If not, is there any way I can add this fix or backport this fix?</li>
<li>Could someone please suggest a workaround for this issue?</li>
<li>Could the reason for this issue be something other than this bug ?</li>
</ol>
]]></description><link>https://forum.qt.io/topic/142597/popup-can-be-dismissed-by-clicking-outside-with-a-mouse-but-the-same-doesn-t-work-with-touch-input</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Nov 2026 16:29:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/142597.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Feb 2023 10:46:43 GMT</pubDate><ttl>60</ttl></channel></rss>