c++ – Detect if the mouse curor is outside QGraphicsView

I have mouseMoveEvent in QGraphicsView, and it changes the stylesheet of a QStatusBar everytime the mouse is in the QGraphicsView. Now I need to restore that QStatusBar color to black whenever it goes outside QGraphicsView, since QStatusBar should display other messages in black style sheet whenever the mouse cursor is not over the QGraphicsView.

Is it somehow possible to detect if the mouse went outside QGraphicsView? Then I could check for that and restore the color in QStatusBar.

Read more here: Source link