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.
setProcessChannelMode(QProcess.
SeparateChannels);
self.qPSCGraph.start('python', ['SmartCableGraphsPressureSensorData.py'])
self.qPSCGraph.finished.connect(self.PSCGraphFinished)
Method xyz(self):
self.emit(QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), pressureList)
# define signal to emit
PressureDataReady = QtCore.pyqtSignal()
# starts process
self.qPSCGraph = QProcess()
self.qPSCGraph.setProcessChannelMode(QProcess.SeparateChannels);
self.qPSCGraph.start('python', ['SmartCableGraphsPressureSensorData.py'])
self.qPSCGraph.finished.connect(self.PSCGraphFinished)
Method xyz(self):
self.emit(QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), pressureList)
To copy to clipboard, switch view to plain text mode
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)
self.connect(self.qPSCGraph, QtCore.SIGNAL("PressureDataReady(PyQt_PyObject)"), ??????, 0)
To copy to clipboard, switch view to plain text mode
any example to point out the correct directions would be appreciated.
Chris
Bookmarks