From b244805bde2775742952562069749361479e257e Mon Sep 17 00:00:00 2001 From: Martin Fitzpatrick Date: Fri, 14 Feb 2014 10:57:05 +0100 Subject: [PATCH] Basic plot function works. --- pyqtgraph/Qt.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pyqtgraph/Qt.py b/pyqtgraph/Qt.py index 4c15f670..5d137fb8 100644 --- a/pyqtgraph/Qt.py +++ b/pyqtgraph/Qt.py @@ -111,11 +111,26 @@ elif USE_QT_PY == PYQT5: from PyQt5 import QtOpenGL except ImportError: pass + + # Re-implement deprecated APIs + def scale(self, sx, sy): + self.setTransform(QtGui.QTransform.fromScale(sx, sy), True) + QtWidgets.QGraphicsItem.scale = scale + + def rotate(self, angle): + self.setRotation(self.rotation() + angle) + QtWidgets.QGraphicsItem.rotate = rotate + + + def setMargin(self, i): + self.setContentsMargins( i, i, i, i) + QtWidgets.QGridLayout.setMargin = setMargin QtGui.QApplication = QtWidgets.QApplication QtGui.QGraphicsScene = QtWidgets.QGraphicsScene QtGui.QGraphicsObject = QtWidgets.QGraphicsObject - QtGui.QGraphicsWidget = QGraphicsWidget5 + QtGui.QGraphicsWidget = QtWidgets.QGraphicsWidget + QtGui.QApplication.setGraphicsSystem = None QtCore.Signal = Qt.pyqtSignal