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) andHuiontablet with aWacomdriver.Qt6mouse works, stylus doesn't
Qt5both mouse and stylus work as expectedMaterial 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
onClickedis not working becauseonReleasedis not being fired while using tablet.Not sure if I'm not using
QMLright 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" -
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) andHuiontablet with aWacomdriver.Qt6mouse works, stylus doesn't
Qt5both mouse and stylus work as expectedMaterial 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
onClickedis not working becauseonReleasedis not being fired while using tablet.Not sure if I'm not using
QMLright 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"onPressedis 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
Comboboxis 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
onReleasedsignal 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
Buttonfor example the radio is no longer checked anymore.
With mouse, everything works as expected.