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