[PyQt] QPainter
Rajeev J Sebastian
rajeev.sebastian at gmail.com
Fri Jun 22 13:47:07 BST 2007
Hi ... the problem is (afaik) paintEvent is called by the framework
... you shouldnt call it ... (other than the other problems in your
code)
On 6/22/07, lucaberto at libero.it <lucaberto at libero.it> wrote:
> 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()
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
More information about the PyQt
mailing list