Results 1 to 4 of 4

Thread: Mouse Interactive Plots

  1. #1

    Question Mouse Interactive Plots

    Is it possible to have a mouse interaction with a curve?

    eg. when i click on a curve some background information is shown in a qt textfield outside of the plot?

    thanks and regards
    myzinsky

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    29
    Thanked 50 Times in 47 Posts

    Default Re: Mouse Interactive Plots

    yup you can do it. Just place the label on the plot and you can able to do, what you wanna do.......

  3. #3

    Default Re: Mouse Interactive Plots

    in which example i can have a look?

    i have a QwtPlotIntervalCurve!

    I want to have each <===> in my plot clickable

    phaseDiagram.jpg

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: Mouse Interactive Plots

    Quote Originally Posted by myzinsky View Post
    Is it possible to have a mouse interaction with a curve?
    You can install an event filter for the plot canvas to handle mouse events - or simply use QwtPlotPicker what does the same ( translating the mouse position into plot coordinates ). Instead of connecting the selected position to a label you could also use the tracker mode of the picker. By overloading QwtPlotPicker::trackerTextF and QwtPlotPicker::trackerText you can modify the text, that is displayed for a specific position.

    But identifying how the position is related to the curve ( or any other item on the plot ) needs to be done in application code.

    Most Qwt examples use the tracker mode of the picker f.e. bode or spectrogram.

    Uwe

Similar Threads

  1. Mouse Interactive Gantt Chart in Qt
    By iuha in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2011, 10:00
  2. Interactive graphics in Qt
    By wconstan in forum Newbie
    Replies: 2
    Last Post: 15th December 2010, 21:51
  3. Interactive QProcess
    By inktomi in forum Qt Programming
    Replies: 3
    Last Post: 8th August 2009, 19:21
  4. interactive image recommendation
    By yagabey in forum Qt Programming
    Replies: 0
    Last Post: 23rd November 2008, 13:03
  5. qsqlquery interactive?
    By lamera in forum Newbie
    Replies: 2
    Last Post: 7th September 2008, 11:09

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
  •  
Qt is a trademark of The Qt Company.