Results 1 to 14 of 14

Thread: Updating and Zooming Plot, that is frequently filled with new Data

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2011
    Posts
    14
    Thanks
    5
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Updating and Zooming Plot, that is frequently filled with new Data

    Hello Qt and Qwt Folks!

    This is my 1st post. Sorry if this topic was already handled here in the forum, but i have found nothing.
    My English is not perfect, sorry for that.

    Let's get to my topic...
    My problem is, that i want to plot a curve, that is updated with data from the database every 500ms. In the past i did this by doing setSamples(x_vals, y_vals); and after that replot(); inside my class that inherits QwtPlot.
    That worked fine, but now I also want to zoom. Zooming in by rubberband and mousewheel, zooming out by right-clicking. So i implemented a QwtPlotZoomer and installed to my QwtPlot.
    And it works fine... as long as you don't update the Plot! It zooms in for a tiny piece of a second and then immediatley zooms out again, after replot() is called.

    So, my idea was to just add data to my plot and let it handle update and zooming functionality itself.
    But I'm just not getting it, how to do that... i tried setAutoReplot(true); ... same problem as before.

    I hope someone can help me. I'm stuck for days, trying out stuff from the qwt examples. trying out setting any scales or scaledraws or scaledivs. This cannot be that difficult, can it?


    Thanks in advance!

  2. The following user says thank you to entonjackson for this useful post:


Similar Threads

  1. Replies: 6
    Last Post: 7th January 2013, 16:30
  2. QwtPlotZoomer zooming off the plot canvas
    By BettaUseYoNikes in forum Qwt
    Replies: 1
    Last Post: 26th June 2011, 11:38
  3. Tree widget not updating the data
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 17th November 2009, 07:00
  4. Qtreewidget not updating data
    By phillip_Qt in forum Qt Programming
    Replies: 2
    Last Post: 12th November 2009, 04:10
  5. confusion with a STATEMENT used frequently
    By salmanmanekia in forum Newbie
    Replies: 3
    Last Post: 11th June 2008, 20:54

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.