View Full Version : Mouseover event on QPushButton

13th January 2006, 19:05
Is there one? Or do I need to create a new thread to poll QPushButton::hasMouse()?

13th January 2006, 19:22
You can use this method:
void QWidget::mouseMoveEvent ( QMouseEvent * e ) [virtual protected]
This event handler, for event e, can be reimplemented in a subclass to receive mouse move events for the widget.
If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.
If you don't want to subclass QPushButton, you can use event filter.

13th January 2006, 19:45
Ah, thank you.