cminogue15
23rd January 2015, 22:02
I have Form A which starts a QProcess B (matplotlib widget).
When events come into Form A, I need to pass a list of data over the the
QProcess B. I am assuming I can do this using signal/slots.
Is this possible?
Code in Form A:
# define signal to emit
PressureDataReady = QtCore.pyqtSignal()
# starts process
self.qPSCGraph = QProcess()
self.qPSCGraph.setProcessChannelMode(QProcess.Sepa rateChannels);
self.qPSCGraph.start('python', ['SmartCableGraphsPressureSensorData.py'])
self.qPSCGraph.finished.connect(self.PSCGraphFinis hed)
Method xyz(self):
self.emit(QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), pressureList)
Code In Form B:
???? not sure what is needed to receive signal and call method
self.connect(self.qPSCGraph, QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), ??????, 0)
any example to point out the correct directions would be appreciated.
Chris
When events come into Form A, I need to pass a list of data over the the
QProcess B. I am assuming I can do this using signal/slots.
Is this possible?
Code in Form A:
# define signal to emit
PressureDataReady = QtCore.pyqtSignal()
# starts process
self.qPSCGraph = QProcess()
self.qPSCGraph.setProcessChannelMode(QProcess.Sepa rateChannels);
self.qPSCGraph.start('python', ['SmartCableGraphsPressureSensorData.py'])
self.qPSCGraph.finished.connect(self.PSCGraphFinis hed)
Method xyz(self):
self.emit(QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), pressureList)
Code In Form B:
???? not sure what is needed to receive signal and call method
self.connect(self.qPSCGraph, QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), ??????, 0)
any example to point out the correct directions would be appreciated.
Chris