[PyQt] QPainter

lucaberto at libero.it lucaberto at libero.it
Fri Jun 22 07:54:17 BST 2007


Hello again here's my code but nothing is draw.

 def on_pushButton_5_clicked(self):
        re = QtCore.QRect(69, 59, 781, 431)
        QtGui.QPaintEvent.__init__(re)
        event = QtGui.QPaintEvent(re)
        self.paintEvent(event)

def paintEvent(self, event):
        gr = QtGui.QPainter(self.frame1)
        gr.setPen(QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine))
        gr.drawLine(70,60,740,60)
        gr.drawLine(70,60, 70, 400)
        gr.drawLine(70, 230,740, 230)
        self.frame1.update()



More information about the PyQt mailing list