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

Phil phillor at telstra.com
Thu Jan 22 10:49:33 CET 2009


Thank you for reading this.

I'm trying to force a paint event by calling update(), but without success.

The following code from the analogue clock example causes a paint event every 
second but I don't want to redraw on a regular time basis. I cannot see why 
calling update() doesn't work when the signal / slot method does.

  QTimer *timer = new QTimer(this);
  connect(timer, SIGNAL(timeout()), this, SLOT(update()));
  timer->start(1000);

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

-- 
Regards,
Phil.



More information about the Qt-interest-old mailing list