Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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



  • 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"



  • @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.


Log in to reply