NPill: added support for middle mouse button
This commit is contained in:
parent
0915071299
commit
f3d1d15b61
1 changed files with 5 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ Item {
|
|||
signal exited
|
||||
signal clicked
|
||||
signal rightClicked
|
||||
signal middleClicked
|
||||
signal wheel(int delta)
|
||||
|
||||
// Internal state
|
||||
|
|
@ -207,7 +208,7 @@ Item {
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||
onEntered: {
|
||||
root.entered()
|
||||
tooltip.show()
|
||||
|
|
@ -231,6 +232,9 @@ Item {
|
|||
} else if (mouse.button === Qt.RightButton) {
|
||||
root.rightClicked()
|
||||
}
|
||||
else if (mouse.button === Qt.MiddleButton) {
|
||||
root.middleClicked()
|
||||
}
|
||||
}
|
||||
onWheel: wheel => {
|
||||
root.wheel(wheel.angleDelta.y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue