471,349 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,349 software developers and data experts.

QPicture and Qpainter PyQt4

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):
gr = QtGui.QPainter()
gr.drawPicture(0, 0, picture)

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?

Sep 17 '07 #1
0 853

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.