Spectral/imports/Spectral/Component/AutoMouseArea.qml

14 lines
301 B
QML
Raw Normal View History

2018-12-07 01:18:42 +00:00
import QtQuick 2.12
2018-10-01 08:07:48 +00:00
import Spectral.Setting 0.1
MouseArea {
signal primaryClicked()
signal secondaryClicked()
2019-04-30 09:02:00 +00:00
acceptedButtons: Qt.LeftButton | Qt.RightButton
2018-09-04 13:13:14 +00:00
onClicked: mouse.button == Qt.RightButton ? secondaryClicked() : primaryClicked()
2019-04-30 09:02:00 +00:00
onPressAndHold: secondaryClicked()
}