On Mon Sep 17 09:29:43 CEST 2007, luca72 wrote:

> class PictureFrame(QtGui.QFrame):
> 
>   def __init__(self, parent = None):
>     QFrame.__init__(self, parent)
>     picture = QtGui.QPicture()
> 
>   def paintEvent(self, event):
>     picture.load('dis.pic')
>     gr = QtGui.QPainter()
>     gr.begin(self.frame)
>     gr.drawPicture(0, 0, picture)
>     gr.end()
> 
> But nothing is paint.
> Can you give me some help

You should probably be painting on "self" instead of "self.frame".

It may not be related to your problem, but why don't you store the picture in
"self.picture" rather than the local "picture" variable?

David
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to