Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Popup can be dismissed by clicking outside with a mouse but the same doesn't work with touch input.
Forum Updated to NodeBB v4.3 + New Features

Popup can be dismissed by clicking outside with a mouse but the same doesn't work with touch input.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 275 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ak_07
    wrote on last edited by ak_07
    #1

    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:

    1. Will this fix be added to 6.2.4?
    2. If not, is there any way I can add this fix or backport this fix?
    3. Could someone please suggest a workaround for this issue?
    4. Could the reason for this issue be something other than this bug ?
    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved