Results 1 to 3 of 3

Thread: Mouseover event on QPushButton

  1. #1
    Join Date
    Jan 2006
    Posts
    21
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Mouseover signal on QPushButton

    Is there one? Or do I need to create a new thread to poll QPushButton::hasMouse()?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Mouseover event on QPushButton

    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.

  3. #3
    Join Date
    Jan 2006
    Posts
    21
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Mouseover event on QPushButton

    Ah, thank you.

Similar Threads

  1. Replies: 4
    Last Post: 19th February 2009, 12:10
  2. Custom event gets not propagated to the top level widget
    By nightghost in forum Qt Programming
    Replies: 0
    Last Post: 29th January 2009, 10:06
  3. Event propagation direction
    By spraff in forum Qt Programming
    Replies: 0
    Last Post: 6th December 2008, 22:03
  4. Qpushbutton
    By iamhere in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2008, 05:40
  5. Qt event queue overloading?
    By gct in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2008, 19:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.