how to know that mouse cursor is above one of the item (like pushbutton / lineedit) ?
how to know that mouse cursor is above one of the item (like pushbutton / lineedit) ?
by QCursor::pos() , you can locate cursor position in global screen.
Life is about making the right decisions and moving on.
It depends what you need this information for. The most general way is to handle enter and leave events for the widget (see QWidget::enterEvent()). Using QCursor::pos() is definitely not a good approach.
Bookmarks