Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Drawer behaves different when using a physical mouse, and when using a touchscreen
Forum Updated to NodeBB v4.3 + New Features

Drawer behaves different when using a physical mouse, and when using a touchscreen

Scheduled Pinned Locked Moved Solved Qt 6
2 Posts 1 Posters 260 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.
  • T Offline
    T Offline
    Ttberg
    wrote on 12 May 2022, 12:21 last edited by Ttberg 5 Dec 2022, 12:35
    #1

    I created a very simple application using Qt6.3 and Ubuntu 20 that displays a drawer with a red square, when swiped from the left like this:

    Item {
        Rectangle {
            color: "blue"
            anchors.fill: parent
        }
    
        Drawer {
            edge: Qt.LeftEdge
            y: 50
            height : 500
            width: 500
            enabled: true
            dragMargin: 25
    
            background: Rectangle {
                color: "black"
                opacity: 0.25
            }
    
            Behavior on opacity {
                NumberAnimation{ duration: 500}
            }
    
    
            Rectangle {
                color: "red"
                anchors.centerIn: parent
                visible : true
                width: 100
                height: 100
            }
    
            Label {
                text: "test"
                anchors.centerIn: parent
            }
    
            onVisibleChanged: {
                console.log("visible changed of drawer: " + visible)
            }
        }
    }
    

    I put this example on a touchscreen with a physical mouse attached to it and observed different behaviour:

    When dragging with a physical mouse, the drawer opens and closes normally. If I click beneath the drawer region, nothing happens, if I click on the right of the drawer region, the drawer closes. Nothing strange so far.

    When I drag on the touchscreen, the drawer opens and closes correctly. When clicking on the right region of the drawer when it is open, it closes as it should. When clicking beneath the drawer when it is open, the drawer does not close, but after I've clicked beneath the drawer, the drawer is not able to close any more by dragging it. If I press esc on the keyboard, the drawer closes again, but If I then want to open the drawer again, I can see my log message: visible changed of drawer: true, but it is not displayed. After dragging the drawer in view again with my physical mouse, I can close and open the drawer again with the touchscreen.

    What could be the issue here? Is this a Qt6 bug, or could this be something different?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Ttberg
      wrote on 25 May 2022, 07:41 last edited by
      #2

      this is now marked as a bug:
      https://bugreports.qt.io/browse/QTBUG-103811

      1 Reply Last reply
      0

      • Login

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