【1】問題描述
默認情況下qml支持左鍵,如果需要支持右鍵,甚至是中鍵那需要設置
【2】設置方法
?MouseArea{
? ? ? ? ? ? id: mouse
? ? ? ? ? ? ? ? ? ? ? ?anchors.fill: parent
? ? ? ? ? ? ? ? ? ? ? ?property int cx: 0
? ? ? ? ? ? ? ? ? ? ? ?property int cy: 0
? ? ? ? ? ? ? ? ? ? ? ?acceptedButtons: Qt.RightButton|Qt.LeftButton|Qt.MiddleButton
}