[PyKDE] QMainWindow and paintEvent
gianlum
gianlum at email.it
Tue Nov 2 16:05:19 GMT 2004
Hello.
I am writing an application that need to draw some lines. With the
qt-designer, I create a QMainWindow as main window and all the other widget.
As the documentation said, to draw into a Canvas (or all other widgets) I must
redefine the paintEvent method.
All work good, but when I must update the Canvas (for example when the window
lose the focus and is overlapped from another window), the Canvas were not
updated until I do something (press a key).
It look as the paintEvent is put on the queue, but it is not processed for
some reason.
So I have two question:
1) What are the correct way to write an application with a QMainWindow as main
widget and have a canvas or a pixmap that work as expected, so they are
updated when needed ?
2) How I can force the application to pump the event queue ? (for example in
pygame there is the pygame.event.pump() )
thanks in advance
bye
Gianluca
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Dai più energia al tuo sport! Rigenera il tuo corpo in maniera naturale
* Grazie agli integratori sport che trovi solo su Erboristeria.com
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2379&d=2-11
More information about the PyQt
mailing list