Results 1 to 2 of 2

Thread: QwtPlotDirectPainter wents crazy after replot()

  1. #1
    Join Date
    May 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Question QwtPlotDirectPainter wents crazy after replot()

    Hey,

    I am writing on an application which outputs up to 12 Signals in realtime over an National Instruments PCI-6703.

    For this application I use Qt 5.2.1 and Qwt 6.1.0 on an Ubuntu 12.04 32bit server machine with rtai 4.0 for realtime support.

    While giving out this 12 signals I want to show them on screen. So I added 12 QwtPlots with one curve to my MainWindow.

    After I did replots every 100ms for each of these Plots my application crashes after nearly 30 seconds.

    Yes, by now I know this is to much for my CPU.

    After this experience I found some tips in the www to use the QwtPlotDirectPainter which is used in the Realtime example.

    So I included the IncrementalPlot class to my application and got the QwtPlotDirectPainter to paint some points on my curves.

    Then I showed a whole curve of one signal at an plot with replot() and cleared this plot with replot(), too. Up to this point, everything works fine.

    But now, when I already use the QwtPlotDirectPainter at the same plot to paint some points , all points have the same y-value, which is the last y-value from the curve plot before.

    Do you have an idea what goes wrong with my app?

    Is there any buffer or memory which I oversighted?

    Thanks for your help and best regards from Germany!

  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: QwtPlotDirectPainter wents crazy after replot()

    Quote Originally Posted by Alistannen View Post
    Is there any buffer or memory which I oversighted?
    I bet you find a bug in your code dealing with the buffer of the curve points.

    You might also have a look at the oscilloscope example, what is also using the QwtPlotDirectPainter but probably closer to your use case.

    Uwe

Similar Threads

  1. QwtPlotPicker with QwtPlotDirectPainter
    By friendbaby in forum Qwt
    Replies: 1
    Last Post: 12th December 2012, 14:43
  2. Replies: 10
    Last Post: 1st April 2012, 08:55
  3. Qt Designer QtDesigner Gone Crazy!
    By qtoptus in forum Qt Tools
    Replies: 6
    Last Post: 26th January 2011, 02:17
  4. a crazy problem~~~who can help me : (
    By sunking_426 in forum Qt Programming
    Replies: 4
    Last Post: 2nd January 2009, 14:35

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.