Results 1 to 6 of 6

Thread: Updating QPlot's curve with Qthread

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Updating QPlot's curve with Qthread

    Ah, yep. So I need to make SIGNAL which triggers certain GUI-related (widget) SLOT?
    And I am sorry, the variable names should have been clearer
    Last edited by jendral_hxr; 26th May 2011 at 04:10.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Updating QPlot's curve with Qthread

    I mean who is owner of the graph, QwtPlot and QwtPlotCurve class objects?

  3. #3
    Join Date
    Feb 2011
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Updating QPlot's curve with Qthread

    The 'owner' the QwtPlot, QwtPlotCurve is a class I made myself.

    After reading queuedcustomtype example, it's clear to me: I need to make a SIGNAL in a thread to pass some value to a SLOT of widget which has that 'updating' thread So every self-updating widget has to have its own thread within?

    Thanks, Santosh Reddy

    ummh, it's just embarrassing that the title is QPlot instead of QwtPlot, duh!
    Last edited by jendral_hxr; 27th May 2011 at 14:27.

  4. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Updating QPlot's curve with Qthread

    For any type of "realtime" plot I strongly recommend to decouple the refresh rate of your plot widget from the sample rate.

    Use a QTimer, that periodically checks if new samples have been collected and calls replot then.

    Uwe

Similar Threads

  1. Updating QwtPlot from QThread
    By atzengin in forum Newbie
    Replies: 3
    Last Post: 5th April 2012, 08:05
  2. Replies: 4
    Last Post: 29th April 2010, 06:11
  3. Replies: 1
    Last Post: 22nd January 2010, 14:34
  4. Replies: 4
    Last Post: 26th June 2008, 18:41
  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.