What's the difference between calling QWidget::update() and QWidget::repaint()?
Hello!
In Qwt's QwtPlotCanvas' replot() method, one may either call QWidget::update() or QWidget::repaint() depending on the "immediate paint" configuration.
Is there any significant difference (specially in terms of performance) between using either one of those two methods apart from that QWidget::repaint() does his job immediately while QWidget::update() does not?
Thanks,
Momergil
Re: What's the difference between calling QWidget::update() and QWidget::repaint()?
repaint() performs an immediate repaint, update() schedules an event. This means that
Code:
for(int i=0;i<10;++i) repaint();
will do 10 repaints and
Code:
for(int i=0;i<10;++i) update();
will do one repaint.