Mouse tracking working intermittently after full screen
My application has some widgets that use
setMouseTracking(true)so that they can receive move events and react to mouse hover.
This works fine in practice. However, my application has a feature where you can open a new detached widget and
showFullScreen(). After closing the full screen widget, focus returns to my main window but mouse tracking is no longer working.
I can interact with widgets as if the window has normal focus. I implemented a quick check and confirmed that widgets that are supposed to have tracking still
hasMouseTracking() == true
After a lot of clicking around, the widgets in question eventual return to active mouse tracking.
Is there some aspect of focus that Mac handles differently ? - On Linux I don't have this problem at all.
Fullscreen in OS X and fullscreen in other OSes are different beasts so you may very well have uncovered something.
Can you reproduce that with a minimal compilable example ?
I tried to make a minimal example but so far I cannot replicate the problem.
It's very weird. If I only move the mouse over the window, on and off of the tracked widgets without any clicking then eventually tracking will re-activate.
Got any mouse event related function reimplement in one of your widgets ?
Mouse tracking on two custom widgets as I already mentioned, a QGraphicsView/Scene with dropEvents and mouse event stuff for clicking and dragging graphics items around.
Did you call the base class implementation in your re-implented version ?
I tried with and without but it made no difference.
Then one thing you can do is disable all your widgets and enable them one by one until you have the bug starting again.