def __init__(self, scene): QGraphicsView.__init__(self, scene) self.scene = scene self.setBackgroundBrush(QBrush(Color.background)) self.antialiasing = True self.setHorizontalScrollBarPolicy(qt.ScrollBarAlwaysOff) self.setVerticalScrollBarPolicy(qt.ScrollBarAlwaysOff)
def __init__(self, scene): QGraphicsView.__init__(self, scene) self.scene = scene self.setBackgroundBrush(QBrush(qt.white)) self.setRenderHints(self.renderHints()|QPainter.Antialiasing) self.setHorizontalScrollBarPolicy(qt.ScrollBarAlwaysOff) self.setVerticalScrollBarPolicy(qt.ScrollBarAlwaysOff) self.scene.text_changed.connect(self.viewport().update) # ensure a full redraw
def __init__(self, scene): QGraphicsView.__init__(self, scene) self.scene = scene self.setBackgroundBrush(QBrush(qt.white)) self.setResizeAnchor(QGraphicsView.AnchorViewCenter) self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse) self.setRenderHints(self.renderHints()|QPainter.Antialiasing) self.setHorizontalScrollBarPolicy(qt.ScrollBarAlwaysOff) self.setVerticalScrollBarPolicy(qt.ScrollBarAlwaysOff) inf = -1e10 self.setSceneRect(QRectF(QPointF(-inf, -inf), QPointF(inf, inf))) self.scale(50, 50) #*1.00955