[Qt-interest] Basic update() paint event question

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Fri Jan 23 01:05:23 CET 2009


Phil wrote:
> Calling update() under QT3 used to work and reading the 
> documentation hasn't helped. How do I now force a paintevent
> under QT4?

http://doc.trolltech.com/4.4/qwidget.html#update

"This function does not cause an immediate repaint; instead it schedules
a paint event for processing when Qt returns to the main event loop."

Are you returning to the Qt main event loop between calls to update()?
If you're calling update() inside a loop, the updates won't actually
happen until the loop ends.

You could try using repaint(), but you should be able to use update().
Let's figure out why it's not working for you.

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list