diff --git a/GraphicsView.py b/GraphicsView.py index 3a6970b2..246111b4 100644 --- a/GraphicsView.py +++ b/GraphicsView.py @@ -141,7 +141,7 @@ class GraphicsView(QtGui.QGraphicsView): return scale = Point(self.size().width()/self.range.width(), self.size().height()/self.range.height()) - m = QtGui.QMatrix() + m = QtGui.QTransform() ## First center the viewport at 0 self.resetMatrix() @@ -163,7 +163,7 @@ class GraphicsView(QtGui.QGraphicsView): st = translate m.translate(-st[0], -st[1]) #print " translate:", st - self.setMatrix(m) + self.setTransform(m) self.currentScale = scale #self.emit(QtCore.SIGNAL('viewChanged'), self.range) self.sigRangeChanged.emit(self, self.range) diff --git a/graphicsItems.py b/graphicsItems.py index ddbc26d7..7d28784d 100644 --- a/graphicsItems.py +++ b/graphicsItems.py @@ -1719,7 +1719,7 @@ class ViewBox(QtGui.QGraphicsWidget): return scale = Point(bounds.width()/vr.width(), bounds.height()/vr.height()) #print " scale:", scale - m = QtGui.QMatrix() + m = QtGui.QTransform() ## First center the viewport at 0 self.childGroup.resetMatrix() @@ -1742,7 +1742,7 @@ class ViewBox(QtGui.QGraphicsWidget): st = translate m.translate(-st[0], -st[1]) #print " translate:", st - self.childGroup.setMatrix(m) + self.childGroup.setTransform(m) self.currentScale = scale def invertY(self, b=True):