Results 1 to 4 of 4

Thread: Updating QwtPlot from QThread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    The Netherlands and Spain
    Posts
    150
    Thanks
    6
    Thanked 18 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Updating QwtPlot from QThread

    Stick to one thread and call processEvents in the loop.
    That will make your gui responsive again.

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Updating QwtPlot from QThread

    I'm having the exact same situation here. Real-Time-Data-Acquisition-Oscilloscope !

    You should leave the acquisition in a separate thread with higher priority. To reduce the load for the gui thread you could prepare a QwtSeriesData and pass it through a signal to your gui thread. There you use a QwtPlotDirectPainter to plot only the data that just arrived and avoid replotting everything.

    If that is still not fast enough, qwt provides the QwtWeedingCurveFitter. With it you can subsample your data to make plotting faster. http://www.qtcentre.org/threads/2843...ng-application

    Let me know if you need more details,

    HIH

    Johannes
    Last edited by JohannesMunk; 5th April 2011 at 14:16.

  3. #3
    Join Date
    Apr 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Updating QwtPlot from QThread

    Quote Originally Posted by JohannesMunk View Post
    I'm having the exact same situation here. Real-Time-Data-Acquisition-Oscilloscope !

    You should leave the acquisition in a separate thread with higher priority. To reduce the load for the gui thread you could prepare a QwtSeriesData and pass it through a signal to your gui thread. There you use a QwtPlotDirectPainter to plot only the data that just arrived and avoid replotting everything.

    If that is still not fast enough, qwt provides the QwtWeedingCurveFitter. With it you can subsample your data to make plotting faster. http://www.qtcentre.org/threads/2843...ng-application

    Let me know if you need more details,

    HIH

    Johannes
    Hi Johannes,
    I am having exactly the same issue, can you provide more details please
    Thanks,Lam

Similar Threads

  1. Replies: 0
    Last Post: 15th May 2009, 15:12
  2. Replies: 6
    Last Post: 14th May 2009, 12:02
  3. Replies: 4
    Last Post: 26th June 2008, 18:41
  4. Spawn a QThread in another QThread
    By david.corinex in forum Qt Programming
    Replies: 2
    Last Post: 19th December 2007, 12:54
  5. Replies: 15
    Last Post: 8th May 2007, 11:46

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
  •  
Qt is a trademark of The Qt Company.