0

Details about my system;

Ubunttu 22.04.2 LTS x86_64

pyqtgraph v0.13.1

pyhton v3.10

The code I'm trying to run on line 56;

from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
app = QtGui.QApplication([])

The Error I get;

AttributeError: module 'pyqtgraph.Qt.QtGui' has no attribute 'QApplication'.

is QApplication no longer supported in pyqtgraph?

Not sure on what to do, I got this source code from github and I don't completely understand what the author was doing.

Edit:

I get a similar error on line 58.

win = pg.GraphicsWindow(title="plotting")
AttributeError: module 'pyqtgraph' has no attribute 'GraphicsWindow'.
Gordon Freeman
  • 133
  • 1
  • 1
  • 5

2 Answers2

1

I had the same problem, this is how I resolved mine.

from PyQt5 import QtWidgets  
import pyqtgraph as pg
app = QtWidgets.QApplication([])
buddemat
  • 4,552
  • 14
  • 29
  • 49
0

GraphicsWindow has been deprecated, you should replace it with GraphicsLayoutWidget.