[Interest] Unnecessary repaints.

Jason H jhihn at gmx.com
Thu Dec 17 17:16:58 CET 2015


> 
> My very first Qt app is large and a little sloppy in
> that the QWidget::update() function is being called
> *someplace* where it should not, This is causing
> unnecessary repaints.
> 
> Is there one place I can put a break to find the calls
> which actually cause a repaint (and not the calls
> which are made when a repaint is already pending).
> 
> Or, can you recommend a better way to diagnose
> this problem. (The whole thing needs to be rewritten
> now that I am older and wiser, but not just yet.)

Why do you think they are unnecessary?
Which update() is being called? There's like 4 overloads. Also, realize that Qt will optimize out unneeded updates, or combine multiple into one. I find that Qt is very good about not doing more than needed. It's better to track the paintEvent()s.





More information about the Interest mailing list