1
votes

I have an QtGuiApplication with single QQuickItem. and I want quickitem to receive mouse events when mouse pointer is outside the Main Window. mouse pointer can be anywhere in screen. So at the end QQuickItem should receive mouse events(e.g mouse move) when the mouse pointer is outside application window.

I used grabMouse [void QQuickItem::grabMouse()] to do this. but I see no effect as desired. QuickItem receives event only when mouse pointer is inside App window. It stopped getting any mouse event as soon as mouse pointer leaves the QGuiApplication boundary.

As I read grabMouse should solve my problem but somehow it doesn't. Can anyone point me that is there is any extras need to be done or anything wrong here.

Note : after using grabmouse Quickitem starts getting mousemove event when mouse is passed over application

1

1 Answers

0
votes

I believe you can not receive mouse events when mouse it outside your application window. That is how OS usually works.