Results 1 to 4 of 4

Thread: How to append a QwtPlotItem, not attach?

  1. #1
    Join Date
    May 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default How to append a QwtPlotItem, not attach?

    Hi out there,

    I've got a problem.
    I want to add a QwtPlotCurve to another one.
    Because I want to show several QwtPlotCurves seperated by some lines and when I click on a Curve, it will be shown alone.
    My main problem is that i need to seperate and merge these PlotCurves multiple times.
    But I don't know how to do this.
    Is there a way to add the Curve, so that they are shown appended?
    My Qt Version is: 4.2.2
    My qwt Version is: 5.1.1

    I hope someone can help me.

    daduda

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

    Default Re: How to append a QwtPlotItem, not attach?

    If you want a curve with gaps paint a curve with gaps ( instead of using several curves ). All you need to do is to overload QwtPlotCurve::drawCurve.

    Uwe

  3. #3
    Join Date
    May 2009
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to append a QwtPlotItem, not attach?

    Paint the curves with gaps is not really what I want!
    Because if I have this one big curve, how can I figure out on which curve I have clicked?
    I want to show this single curve than.
    There is no problem to merge all curves to a big one.
    The problem is to show only a single curve if i click on it in the big one!

    daduda

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

    Default Re: How to append a QwtPlotItem, not attach?

    A curve gets its points from a QwtData object. Implement your own type of QwtData, that returns a different set of points depending on the state of your application.

    Uwe

Similar Threads

  1. how to append text in label
    By wagmare in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2009, 11:06

Tags for this Thread

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.