mouse area pin mode
Unsolved
QML and Qt Quick
-
import QtQuick 2.12 import QtQuick.Window 2.12 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Rectangle{ color: "red" width: 300 height: 300 x:10 y:10 MouseArea{ anchors.fill: parent hoverEnabled: true onExited: { console.log("exit red") } onEntered: { console.log("enter red") } onMouseXChanged: { console.log("x mouse red"+mouseX) } onMouseYChanged: { console.log("y mouse red"+mouseY) } } } Rectangle{ color: "green" width: 100 height: 100 x:130 y:10 MouseArea{ anchors.fill: parent hoverEnabled: true onExited: { console.log("exit green") } onEntered: { console.log("enter green") } } } }
In this part, I have two rectangles and inside each rectangle, there is a mouse area
In this part, I want to do the pin mode with the Aria mouse, but the problem is that when the next rectangle, which is located on the lower rectangle, is removed from the Aria mouse, the window can not be opened at the top.Exactly so that you can use the mouse's position in mouse area when there is a button on mouse area, for example, and that the mouse area is on the button does not allow us to exit the mouse area.
Thanks for the support