File: demoscene.py

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (10 lines) | stat: -rw-r--r-- 333 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from PyQt4 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()