from pyqtgraph.flowchart import Flowchart fc = Flowchart(terminals={ 'nameOfInputTerminal': {'io': 'in'}, 'nameOfOutputTerminal': {'io': 'out'} })
And I get the following error after confirming the second line:
QWidget: Must construct a QApplication before a QPaintDevice
Any idea on how this can be fixed ?
Thank you for your help !
M. Mestre
app=QtGui.QApplication([])
app.exec_()Le dimanche 29 septembre 2013 17:55:20 UTC+8, michael.m...@gmail.com a écrit :Hello,
I am interested in PyQtGraph's flowchart feature and wanted to try it on my system (Linux Mint 15).
I installed the Deb package from the website (python-pyqtgraph_0.9.7-1_all.deb).
I copy-pasted in the Python console the first flowchart example from the documentation ( http://www.pyqtgraph.org/documentation/flowchart/index.html ):from pyqtgraph.flowchart import Flowchart fc = Flowchart(terminals={ 'nameOfInputTerminal': {'io': 'in'}, 'nameOfOutputTerminal': {'io': 'out'} })
And I get the following error after confirming the second line:
QWidget: Must construct a QApplication before a QPaintDevice
Any idea on how this can be fixed ?
Thank you for your help !
M. MestreThat's come from PyQt. Before creating any QWidget (PyQtGraph create many QWidget), you need to create to a QApplication and start the Qt event loop.
Yup, it works :)
Thank you very much for your help !!
Are there any simple examples online for a minimal working program implementing flowcharts ?
Best regards,
Michael