aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos/qtdemo/demoscene.py
blob: f03ba1f7fc5d89dc9a10e7a68f34c3896d06068a (plain)
1
2
3
4
5
6
7
8
9
10
from PySide2 import QtGui


class DemoScene(QtGui.QGraphicsScene):
    def drawItems(self, painter, items, options, widget):
        for item, option in zip(items, options):
            painter.save()
            painter.setMatrix(item.sceneMatrix(), True)
            item.paint(painter, option, widget)
            painter.restore()