Results 1 to 3 of 3

Thread: Plot a QwtPlotCurve in a QwtWidgetOverlay

  1. #1
    Join Date
    Jun 2014
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Plot a QwtPlotCurve in a QwtWidgetOverlay

    Hi,

    I'm new with QWT but I'm very enthousiastic with this framework. I'm already able to plot a lot of curves having a lot of points. But now I'd like to be able to drag (shift using the mouse) a selected curve. I'm able to do that in the QwtPlot but I have to replot() all curves with mouse move Event which is a bit slow when a lot of curves are displayed.
    Reading this QwtWidgetOverlay Example, I'm able draw lines smoothly while a lot of curves are displayed.

    So I wonder if it's possible to plot/draw curve inside the overlay/QPainter which could avoid a huge replot();

    Thanks in advance

  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: Plot a QwtPlotCurve in a QwtWidgetOverlay

    Have a look at the itemeditor example. It is for shape items, but the idea how to use a widget overlay for dragging is shown there.

    Uwe

  3. #3
    Join Date
    Jun 2014
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Plot a QwtPlotCurve in a QwtWidgetOverlay

    Hi Uwe,

    Thanks for your reply. I had a look on this example and I probably can use this technique.
    But I'd like to know if there's any way to plot a qwtPlotCurve into the overlay or the associated Painter (in parameter of virtual void drawOverlay( QPainter *painter ) const ) !?

    Thanks for your reply.

Similar Threads

  1. Replies: 2
    Last Post: 20th March 2014, 10:53
  2. Replies: 8
    Last Post: 9th February 2014, 12:37
  3. Replies: 2
    Last Post: 27th November 2013, 00:56
  4. Replies: 8
    Last Post: 18th October 2012, 07:23
  5. Replies: 1
    Last Post: 11th May 2012, 08:02

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.