QtWidgets was introduced in Qt5. See : http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html#qtgui-module
If you are using PyQt4, you should import QtGui instead of QtWidgets On Tuesday, October 30, 2018 8:24:51 AM CET Deckard Zhang wrote: > when only install pyqtgraph, it is ok to run "from pyqtgraph.Qt import > QtWidgets" > however, when I install pyqt4 together, an error happen when run > "from pyqtgraph.Qt import QtWidgets" > > ImportError: cannot import name QtWidgets > > > What's wrong? Thank you -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: [email protected] Phone: +34 93 592 4428 +----------------------------------------------------+ -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/11677936.SaUXGsCNau%40pc218. For more options, visit https://groups.google.com/d/optout.
