我需要通过传递LineSeries
项来从qml调用我的python类中的一个插槽。
dataforchart.update(idChartView.series(0))
这里dataforchart是我的python类名,更新是插槽。
@pyqtSlot('QAbstractSeries',result='QXYSeries')
def update(self,series):
print("Inside readBasicStatisticsData")
if (series):
xySeries=QXYSeries.QXYSeries()
xySeries = series
self.m_index=self.m_index+1
if (m_index > 25000):
m_index = 0;
points = m_data[m_index];
xySeries.replace(points);
return xySeries
但是我收到了像
这样的错误 @pyqtSlot('QAbstractSeries',result='QXYSeries')
TypeError: C++ type 'QAbstractSeries' is not supported as a pyqtSlot type
argument type