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.
def __init__(self, params):
super().__init__()
#init with params
self.mycurv.append(QLineSeries(self))
self.addSeries(self.allCruvs[-1])
def plotData(self, Time, Values, color=None, curvIndex=0):
self.mycurv.clear()
lastTime = self.myZero
for i, theTime in enumerate(Time):
if (theTime > lastTime + MININTERVALTIME):
self.mycurv.append(lastTime - self.myZero, Values[i])
self.mycurv.append(theTime - self.myZero, Values[i])
lastTime = theTime
self.update()
def __init__(self, params):
super().__init__()
#init with params
self.mycurv.append(QLineSeries(self))
self.addSeries(self.allCruvs[-1])
def plotData(self, Time, Values, color=None, curvIndex=0):
self.mycurv.clear()
lastTime = self.myZero
for i, theTime in enumerate(Time):
if (theTime > lastTime + MININTERVALTIME):
self.mycurv.append(lastTime - self.myZero, Values[i])
self.mycurv.append(theTime - self.myZero, Values[i])
lastTime = theTime
self.update()
To copy to clipboard, switch view to plain text mode
if at the end in stead of self.update, I put
self.removeAllseries()
self.addseries(self.mycurv)
self.removeAllseries()
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
Bookmarks