I am having problems getting unsetCursor( ) to work properly. Inside my QGLWidget, my cursor changes because of various reasons. But when I leave the widget I want to set the cursor back to normal. I have 2 QGLWidgets separated by a QSplitter so one widget is above the other. My code looks like this simple thing:
/**
@param event The pointer to the QEvent
@return void
@brief Checks to see if mouse cursor has left the widget
Checks to see if mouse cursor has left the widget so it
can reset the cursor to normal.
*/
void Plot
::leaveEvent( QEvent* event
) {
unsetCursor( );
}
/**
@param event The pointer to the QEvent
@return void
@brief Checks to see if mouse cursor has left the widget
Checks to see if mouse cursor has left the widget so it
can reset the cursor to normal.
*/
void Plot::leaveEvent( QEvent* event )
{
unsetCursor( );
}
To copy to clipboard, switch view to plain text mode
This is all I want to do in my leaveEvent for now. Plot is a QGLWidget. But if I move from the bottom of the top widget to the splitter with a unique cursor, the mouse changes to the split cursor for the QSplitter and then when I enter the other Plot object, the cursor goes back to the unique cursor although I never tell it to in the bottom object. Why does the cursor seem not to reset when I leave the top object even though my leaveEvent tells it to? Thanks again!
Bookmarks