Results 1 to 2 of 2

Thread: curve draw while curve not visible fails

  1. #1
    Join Date
    Sep 2008
    Posts
    17
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default curve draw while curve not visible fails

    Hi,

    I am successfully drawing a curve in realtime and I'm showing some values.
    This can be changes with a scrollbar.

    But if I don't look at the latest incoming values and scroll back while still retrieving data the new values are not painted correctly.
    See problem in the jpg.


    The run function of my plotter: (important lines)
    Qt Code:
    1. for(int d=0;d<intervals;d++)
    2. {
    3. int id = values[d*step];
    4. qint64 value = values[(d*step)+a+1];
    5. dataList[a].append(id, value);
    6. }
    7. curveList[a]->setRawData(dataList[a].x(), dataList[a].y(), dataList[a].size());
    To copy to clipboard, switch view to plain text mode 

    finally the curve is plotted with replot() every 50 ms.

    Thanks in advance for any help you may give.
    Attached Images Attached Images

  2. #2
    Join Date
    Sep 2008
    Posts
    17
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: curve draw while curve not visible fails

    Well the solution was quite easy.
    My values are stored in a ring buffer and this buffer was to small when the program was busy doing other things and lost some values.

Similar Threads

  1. Replies: 1
    Last Post: 13th January 2010, 18:21
  2. Draw dynamic curve with various colors...
    By jiapei100 in forum Qwt
    Replies: 0
    Last Post: 25th October 2009, 04:31
  3. Replies: 5
    Last Post: 10th October 2008, 07:44
  4. Want to draw Curve
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 12th September 2008, 08:14
  5. Wants to draw Luminious Curve
    By santhoshv84 in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2008, 23:45

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.