Results 1 to 3 of 3

Thread: Mouse over event on qwtmarker?

  1. #1
    Join Date
    Jul 2009
    Posts
    15
    Thanks
    1

    Default Mouse over event on qwtmarker?

    Hi,
    I`m trying to catch the QEvent::HoverEnter event on a marker , but when the mouse is over the qwtmarker the event is not throw.
    I use a event filter like this:
    if(event->type() == QEvent::HoverEnter)
    an previously set this flag to the widget :
    setAttribute(Qt::WA_Hover);

    How I do to catch the event when the mouse is over the symbol of a marker?

    Thank you,

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,309
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Mouse over event on qwtmarker?

    Plot items are no QObjects - they don't receive or handle any events. If you want to handle mouse events you have to use a QwtPlotPicker or implement an event filter for the plot canvas ( like the event_filter example ).

    Uwe

  3. #3
    Join Date
    Jul 2009
    Posts
    15
    Thanks
    1

    Default Re: Mouse over event on qwtmarker?

    Quote Originally Posted by Uwe View Post
    Plot items are no QObjects - they don't receive or handle any events. If you want to handle mouse events you have to use a QwtPlotPicker or implement an event filter for the plot canvas ( like the event_filter example ).

    Uwe
    hi,
    But if I extend the qwtmarker´s class with a new class that is a subclass of a qwidget , the mouse events never handles .

Similar Threads

  1. mouse move event filtering in PyQt4
    By lucaf in forum Qt Programming
    Replies: 1
    Last Post: 4th April 2009, 15:53
  2. how to send a emulated mouse event to QListWidget
    By yxmaomao in forum Qt Programming
    Replies: 4
    Last Post: 22nd July 2008, 03:49
  3. pass mouse event information to another widget
    By Rooster in forum Qt Programming
    Replies: 5
    Last Post: 12th July 2008, 05:23
  4. Enter event mouse position
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 7th May 2008, 19:53
  5. The event fired by the mouse click on the frame
    By Placido Currò in forum Qt Programming
    Replies: 8
    Last Post: 3rd March 2007, 10:05

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.