[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyKDE] QMainWindow and paintEvent
From: gianlum <gianlum () email ! it>
Date: 2004-11-02 16:05:19
Message-ID: 200411021705.20636.gianlum () email ! it
[Download RAW message or body]
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
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic