Qt 5.6.1 - MouseArea pressed() and onPressAndHold() misbihaving - BUG?
Unsolved
Mobile and Embedded
-
Qt Version 5.6.1
Device: WEC7
When I run the example below on WEC7 the MouseArea signals misbehave.
I press and hold the close button.
I get the following flow of the signals:
Status:+pressed+pressandhold+released+pressed+pressandhold+releasedWhen I run this example on Win32 i get the expected behaviour:
Status:+pressed+pressandhold+releasedSo I guess either there is a BUG in WINCE/WEC or I am something missing here.
"+pressandhold+released" signals get emitted almost immediattely after the press.
Could anyone help? Any ideas?import QtQuick 2.6 import QtQuick.Window 2.2 Window { id: root visible: true width: 480; height: 800; color: "#cbcaca" title: "Demo" flags: Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window Rectangle { id: close width: 100; height: 100; anchors { bottom: parent.bottom; left: parent.left; } color: "orange" border.color: "black" border.width: 1; opacity: 0.5 Text { id: quittext text: qsTr("X") anchors.centerIn: parent; font.pointSize: 20; font.bold: true; } MouseArea { anchors.fill: parent; onReleased: { statustext.text=statustext.text+"+released"; close.color="orange" } onClicked: { statustext.text=statustext.text+"+clicked"; Qt.quit(); } onPressAndHold: { statustext.text=statustext.text+"+pressandhold"; } onPressed: { statustext.text=statustext.text+"+pressed"; close.color="green" } } } Rectangle { id: status height: 100; width: parent.width-100; anchors { left: close.right; bottom: parent.bottom; } Text { width: parent.width; id: statustext anchors.centerIn: parent;text: qsTr("Signals: ") font.pointSize: 8; wrapMode: Text.WordWrap } MouseArea { anchors.fill: parent; onClicked: Qt.quit(); } } }