On 12/17/2015 11:16 AM, Jason H wrote:


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.


I do not think there is a Qt issue here.
I'm sure it is me that is calling update when I should not.

I know they are unnecessary because my app responds with multiple
screen refreshes (paints) from a single user action. And for me those
paints can be expensive.

It is possible to investigate this using gdb with the
following, but not easy.

--------------- gdb commands.

file my_app

set logging redirect
set logging on temp.dat

set height 0

break QWidget::update
commands
    where
    continue
end

run



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to