From ac4eaa6860f1d4bc73b5f3a7f5039774386df2df Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Mon, 1 Feb 2021 09:12:42 +0800 Subject: [PATCH] remove redundant shims --- pyqtgraph/Qt.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pyqtgraph/Qt.py b/pyqtgraph/Qt.py index 4f14c6b2..505bea32 100644 --- a/pyqtgraph/Qt.py +++ b/pyqtgraph/Qt.py @@ -295,18 +295,13 @@ if QT_LIB in [PYQT5, PYQT6, PYSIDE2, PYSIDE6]: # We're using Qt5 which has a different structure so we're going to use a shim to # recreate the Qt4 structure - QtGui.QApplication = QtWidgets.QApplication - QtGui.QGraphicsScene = QtWidgets.QGraphicsScene - QtGui.QGraphicsObject = QtWidgets.QGraphicsObject - QtGui.QGraphicsWidget = QtWidgets.QGraphicsWidget - - QtGui.QApplication.setGraphicsSystem = None - # Import all QtWidgets objects into QtGui for o in dir(QtWidgets): if o.startswith('Q'): setattr(QtGui, o, getattr(QtWidgets,o) ) + QtGui.QApplication.setGraphicsSystem = None + if QT_LIB in [PYQT6, PYSIDE6]: # We're using Qt6 which has a different structure so we're going to use a shim to