[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt]  scene and layers
From:       "Christopher M. Nahler" <christopher.nahler () papermodels ! at>
Date:       2010-04-30 9:25:49
Message-ID: 4BDAA21D.5070609 () papermodels ! at
[Download RAW message or body]

drawBackground works. thx for the help.

     def drawBackground(self, painter, rect):
         backgroundColor = Qt.red
         painter.setPen(QPen(backgroundColor, 1, Qt.SolidLine))
         painter.setBrush(QBrush(Qt.lightGray, Qt.SolidPattern))
         # draw frame
         painter.drawRect(0, 0, 800, 600)
         # draw grid
         for y in range(0, 601, 50):
             for x in range(0, 801, 50):
                 painter.drawRect(x-1, y-1, 3, 3)
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic