Results 1 to 1 of 1

Thread: what is the function or the slot which is responsable of plot update in QChart?

  1. #1
    Join Date
    Oct 2017
    Posts
    3
    Qt products
    Platforms
    MacOS X Windows

    Default what is the function or the slot which is responsable of plot update in QChart?

    Hello, I need to plot in live with Qchart, but it didn't update with the code below.

    So I am searching the function or the slot which is responsable of plot update, so I will activate it by myself.

    Qt Code:
    1. def __init__(self, params):
    2. super().__init__()
    3.  
    4. #init with params
    5.  
    6. self.mycurv.append(QLineSeries(self))
    7. self.addSeries(self.allCruvs[-1])
    8.  
    9. def plotData(self, Time, Values, color=None, curvIndex=0):
    10. self.mycurv.clear()
    11. lastTime = self.myZero
    12. for i, theTime in enumerate(Time):
    13. if (theTime > lastTime + MININTERVALTIME):
    14. self.mycurv.append(lastTime - self.myZero, Values[i])
    15.  
    16. self.mycurv.append(theTime - self.myZero, Values[i])
    17. lastTime = theTime
    18. self.update()
    To copy to clipboard, switch view to plain text mode 

    if at the end in stead of self.update, I put
    Qt Code:
    1. self.removeAllseries()
    2. self.addseries(self.mycurv)
    To copy to clipboard, switch view to plain text mode 
    it is working in live for a while, and the the application crashes.

    Thanks in advance
    Attached Files Attached Files

Similar Threads

  1. Replies: 2
    Last Post: 26th October 2013, 06:40
  2. Replies: 2
    Last Post: 26th August 2011, 09:51
  3. Replies: 5
    Last Post: 5th November 2010, 18:26
  4. Replies: 1
    Last Post: 1st February 2010, 16:13
  5. How to update eventFilter function?
    By newermind in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2009, 10:36

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.