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. onReleased signal not firing from QML components when using wacom tablets, mouse works
QtWS25 Last Chance

onReleased signal not firing from QML components when using wacom tablets, mouse works

Scheduled Pinned Locked Moved Unsolved Qt 6
2 Posts 1 Posters 523 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.
  • C Offline
    C Offline
    CuteQt
    wrote on last edited by
    #1

    Let's consider the following example.

    import QtQuick 2.12
    import QtQuick.Controls 2.12
    import QtQuick.Controls.Material 2.12
    
    
    ApplicationWindow {
        visible: true
        width: 300
        height: 420
    
        Button {
            anchors.centerIn: parent
            text: 'OK!'
            onClicked: console.debug('Clicked')
            onPressed: console.debug('Pressed')
            onReleased: console.debug('Released')
        }
    }
    

    I'm using Linux (KDE Neon) and Huion tablet with a Wacom driver.

    Qt6 mouse works, stylus doesn't
    Qt5 both mouse and stylus work as expected

    Material theme is not required, I only put it as it makes it easier to visualize what's happening.

    Please correct me if I'm wrong but I believe onClicked is not working because onReleased is not being fired while using tablet.

    Not sure if I'm not using QML right or if this is a regression thing somehow related to this bug
    https://bugreports.qt.io/browse/QTBUG-72624?jql=project %3D QTBUG AND component %3D "GUI%3A Wacom Tablet Input"

    C 1 Reply Last reply
    0
    • C CuteQt

      Let's consider the following example.

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Controls.Material 2.12
      
      
      ApplicationWindow {
          visible: true
          width: 300
          height: 420
      
          Button {
              anchors.centerIn: parent
              text: 'OK!'
              onClicked: console.debug('Clicked')
              onPressed: console.debug('Pressed')
              onReleased: console.debug('Released')
          }
      }
      

      I'm using Linux (KDE Neon) and Huion tablet with a Wacom driver.

      Qt6 mouse works, stylus doesn't
      Qt5 both mouse and stylus work as expected

      Material theme is not required, I only put it as it makes it easier to visualize what's happening.

      Please correct me if I'm wrong but I believe onClicked is not working because onReleased is not being fired while using tablet.

      Not sure if I'm not using QML right or if this is a regression thing somehow related to this bug
      https://bugreports.qt.io/browse/QTBUG-72624?jql=project %3D QTBUG AND component %3D "GUI%3A Wacom Tablet Input"

      C Offline
      C Offline
      CuteQt
      wrote on last edited by
      #2

      @CuteQt

      onPressed is not always practical because it breaks a lot of things. Let's imagine the following example:

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Controls.Material 2.12
      
      ApplicationWindow {
          visible: true
          width: 300
          height: 420
      
          ComboBox {
              anchors.centerIn: parent
              model: ['Red', 'Green', 'Blue']
          }
      }
      

      The Combobox is inaccessible if you are using a graphics tablet.

      Let's imagine the following example with a drawer.

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Controls.Material 2.12
      
      ApplicationWindow {
          visible: true
          width: 300
          height: 420
      
          Drawer {
              width: parent.width * 0.6
              height: parent.height
      
              ListView {
                  anchors.fill: parent
                  model: 6
                  delegate: ItemDelegate {
                      width: parent.width
                      text: `Menu Item ${index}`
                  }
              }
          }
      }
      

      You can pull the drawer using a stylus but it doesn't stay opened and follows the cursor because I believe onReleased signal is never fired.
      Mouse works as expected.

      Let's consider the following example:

      import QtQuick 2.12
      import QtQuick.Controls 2.12
      import QtQuick.Controls.Material 2.12
      
      ApplicationWindow {
          visible: true
          width: 300
          height: 420
      
          Column {
              id: radios
              anchors.centerIn: parent
      
              RadioButton { id: red; text: 'Red' }
              RadioButton { id: green; text: 'Green' }
              RadioButton { id: blue; text: 'Blue' }
      
              Button {
                  text: 'Ok'
              }
          }
      }
      

      With stylus, the radio buttons seem to be checked but as soon as you click on something else like the Button for example the radio is no longer checked anymore.
      With mouse, everything works as expected.

      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