Results 1 to 3 of 3

Thread: catching mouseMoveEvent on QwtPlot

  1. #1
    Join Date
    Aug 2009
    Location
    Brisbane, Australia
    Posts
    75
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default catching mouseMoveEvent on QwtPlot

    Is it possible to catch mouseMoveEvent without creating a new QwtPlot class?

    I'm trying to move a QwtPlotMarker with a right mouse drag. The marker already moves with edit box changes.

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

    Default Re: catching mouseMoveEvent on QwtPlot

    Install an event filter for the plot canvas: see QObject::installEventFilter. In SVN trunk you find a new example "itemeditor" that shows how to drag plot items with the mouse.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    grantbj74 (30th July 2012)

  4. #3
    Join Date
    Aug 2009
    Location
    Brisbane, Australia
    Posts
    75
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: catching mouseMoveEvent on QwtPlot

    So I need to install the latest build of the trunk to run this example? for QwtPlotOverlay etc.

    I also had a go at installing Qwt on Fedora, to see the example, but ran into that conflict with /usr/lib/libqwt issue. Know of any qmake fixes?

    All too tricky for me.

Similar Threads

  1. Catching exceptions with Qt
    By The_Fallen in forum Qt Programming
    Replies: 6
    Last Post: 30th July 2010, 19:39
  2. Replies: 6
    Last Post: 14th May 2009, 12:02
  3. Qt - catching interrupts
    By rishid in forum Qt Programming
    Replies: 2
    Last Post: 5th February 2008, 14:17
  4. Catching XEvents with x11EventFilter
    By colfax4 in forum Qt Programming
    Replies: 1
    Last Post: 21st May 2007, 05:27
  5. Catching X Events
    By nupul in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2006, 12:43

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.