From 3eb69e6d9b8b8ee46a75f96e6ebd732e9e2e0076 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Thu, 13 May 2021 09:48:47 +0800 Subject: [PATCH] provide QApplication.exec() for PySide6 6.0 --- pyqtgraph/Qt.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyqtgraph/Qt.py b/pyqtgraph/Qt.py index 4fd257df..6ae20cbb 100644 --- a/pyqtgraph/Qt.py +++ b/pyqtgraph/Qt.py @@ -334,6 +334,10 @@ if QT_LIB == PYSIDE6: self.setColorAt(pos, color) QtGui.QGradient.setStops = __setStops + if not hasattr(QtWidgets.QApplication, 'exec'): + # PySide6 6.0 forwards compatibility to PySide6 6.1 + QtWidgets.QApplication.exec = QtWidgets.QApplication.exec_ + if QT_LIB == PYQT6: # module.Class.EnumClass.Enum -> module.Class.Enum