[PyQt] QPainter Again
lucaberto at libero.it
lucaberto at libero.it
Tue Jun 26 09:37:17 BST 2007
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/
More information about the PyQt
mailing list