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

List:       pykde
Subject:    [PyQt] QPainter  Again
From:       "lucaberto\ () libero\ ! it" <lucaberto () libero ! it>
Date:       2007-06-26 8:37:17
Message-ID: JK8IM5$D817A7D5761136A6976EF551B9262CBB () libero ! it
[Download RAW message or body]

Hello and sorry but i don't understand the mistacke:

I do as follow:

    class PictureFrame(QtGui.QFrame): 

        def __init__(self, parent = None):
            QFrame.__init__(self, parent)
            self.picture = QtGui.QPicture()
        
        def paintEvent(self, event):
            p = QPainter(self)   
            p.drawPicture(0, 0, self.picture)
              
    @pyqtSignature("")
    def on_pushButton_5_clicked(self):
        gr = QtGui.QPainter(self.frame1.picture)
        gr.setPen(QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine))
        gr.drawLine(70,50,740,50)
        gr.drawLine(70,60, 70, 400)
        gr.drawLine(70, 230,740, 230)
        self.frame1.update()

but i get unhandled attributeError 'picture'

Thanks for your help 

Luca


------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/


_______________________________________________
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