VoxelVortex Gaming VoxelVortex Gaming - 1 year ago 48
Python Question

pyqtgraph QGraphicsWidget import error

I'm trying to make a program using

, however, I keep running into this error:

ImportError: cannot import name 'QGraphWidget'

I used
to make a form and promoted a
. I know I did it correctly (I've done it at least 10 times to try and resolve the issue), but the error persists.

I'm using
Windows 7
, and
, but I tried running the code in other environments and still got the error.

Answer Source

In the documentation it implies that the promoted name can be anything, however, this seems to be untrue (at least at the moment).

Under “Promoted class name”, enter the class name you wish to use (“PlotWidget”, “GraphicsLayoutWidget”, etc).

After re-doing my QGraphicsWidget for the 6th time, I decided to name it one of the example names in the tutorial, which seems to have solved the problem.

In other words name your widget and promoted widget "PlotWidget", "ImageView", "GraphicsLayoutView", or "GraphicsView". (Please keep in mind I have only tested "PlotWidget".)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download