[PyQt] Bugs and Question in doc/examples/tutorials/t10.py
Grissiom
chaos.proton at gmail.com
Wed Dec 3 15:02:07 GMT 2008
Hi,
According to the doc,
1,"self.update()" in the CannonField.setAngle() should be
"self.update(self.cannonRect())"
2,"esult.moveBottomLeft(self.rect().bottomLect())" in
CannonField.cannonRect() should be
"result.moveBottomLeft(self.rect().bottomLeft())"
And here comes the questions:
I think that creating a QtCore.QRect and moving it every time repaint the
widget is not so good. So I move the code to __init__ and make cannonRect a
local variable rather than a function. But the cannon doesn't move i.e, the
widget doen't get repainted correctly. Any hint there?
--
Cheers,
Grissiom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20081203/d75abf68/attachment.html
More information about the PyQt
mailing list