Detect Clicks outside QML Window
How do i detect clicks outside Window {} in QML ?
Code:
Rectangle {
id: topLevel
height: 400; width: 400
Window {
id: windowObj
color: "blue"
height: 200; width: 200
onActiveChanged { console.trace() }
}
Component.onCompleted: windowObj.visible = true
}
Suppose I click on some part of topLevel outside windowObj.
onActiveChanged works on Windows but not on MAC.
{Using: QtQuick 2.1, QtQuick.Window 2.1, QML/Qt 5.2.0}
Re: Detect Clicks outside QML Window
Hi,
maybe i m wrong but in C++ you can grab mouse event, and catch them even if mouse is outside window. Maybe a similary think in QtQuick is possible. And you just test after if coordonate are outside the window.
Sincerely