Results 1 to 18 of 18

Thread: How to draw a cruve with increasing data?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    14
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to draw a cruve with increasing data?

    Quote Originally Posted by Uwe View Post
    Painting incrementally doesn't depend on what is painted. You wrote, that the realtime example works - so it's obviously a problem in your application code.

    Uwe
    when I enable Qt::WA_PaintOutsidePaintEvent, it will run faster, but it can't display anything unless I left-clicked mouse in the canvas, it is the same in the realtime_plot example not only just in my application code.

  2. #2
    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: How to draw a cruve with increasing data?

    Quote Originally Posted by anson97209 View Post
    when I enable Qt::WA_PaintOutsidePaintEvent, it will run faster, but it can't display anything unless I left-clicked mouse in the canvas,
    No surprise, when it doesn't paint anything.
    ... it is the same in the realtime_plot example not only just in my application code.
    I explicitely asked if it is working ...

    I checked the example with Qt 4.3 on X11 with success - so I guess you are running Qt Embedded ( I also asked you which Qt you are using ... ). On Qt Embedded Qt::WA_PaintOutsidePaintEvent is not supported and of course nothing will be painted ( clicking in the canvas triggers a repaint ).

    The strategy on platforms, where the raster paint engine is used, is that each drawCurve posts a dummy event and paints inside the paint event. You have the penalty of posting/processing the paint event, but you don't need to paint anything beside the additional points. There is no way to get around this limitation of Qt4 ( Qt3 should be faster ).

    You didn't write how many points you want to paint in which time and I have no idea how fast your arm board is. But with the realtime example you can try to find out what is possible.

    One more hint: fixing performance issues of the raster paint engine was one of the main features of Qt 4.5. If painting is too slow you could try to upgrade from Qt 4.3 ( AFAIR you might have something about 20-30%).

    Uwe

  3. #3
    Join Date
    Sep 2009
    Posts
    14
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to draw a cruve with increasing data?

    Thank you very much!

  4. #4

    Default Re: How to draw a cruve with increasing data?

    Quote Originally Posted by anson97209 View Post
    Thank you very much!
    Hi anson97209,

    I'm also trying to plot running data and have referred curveplot1, curveplot2, realtimeplot and so on example but was unable to make it up to the mark.
    Can you upload your complete plotting code or mail me to sumit@sofomo.co.in?

    Thank You.

    Regards,
    Sumit

Similar Threads

  1. data rate transfer is decreasing in TCP connection
    By navi1084 in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2009, 16:15
  2. Draw New data, without erasing old ones
    By linuxdev in forum Newbie
    Replies: 11
    Last Post: 7th January 2009, 08:34
  3. Best way to display lots of data fast
    By New2QT in forum Newbie
    Replies: 4
    Last Post: 16th October 2008, 22:46
  4. Replies: 4
    Last Post: 19th October 2007, 19:47
  5. speed of setdata - lots of items in treeview
    By Big Duck in forum Qt Programming
    Replies: 4
    Last Post: 6th July 2006, 12:53

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.