View Full Version : knowing mouse location
riarioriu3
21st June 2012, 08:23
how to know that mouse cursor is above one of the item (like pushbutton / lineedit) ?
Ali Reza
21st June 2012, 08:29
by QCursor::pos() , you can locate cursor position in global screen.
wysota
21st June 2012, 08:48
how to know that mouse cursor is above one of the item (like pushbutton / lineedit) ?
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.