[Interest] Unnecessary repaints.
Bill Crocker
william.crocker at analog.com
Thu Dec 17 19:42:37 CET 2015
On 12/17/2015 01:03 PM, william.crocker at analog.com wrote:
>
>>>
>>> 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.
>>
If I call:
QWidget::update() and
QWidget::updateGeometry()
Can I assume the layout request would be processed first and
then any repaints would take place.
In general can I assume that all layout requests would be serviced
upon return to the event loop before any repaints.
Bill
>>
>> Did you write a widget that calls update()? I'm not sure I understand your
>> concern. update() should only be called when a redraw is needed. This is
>> primarily done to reflect new data, or occasionally because something obscured
>> the widget, which was not stored on a double buffer, and it needs to be
>> redrawn. See also invalidate().
>>
>> What single user action is happening?
>
> Single user action might be one mouse click
> in my custom widget.
>
> I am just wasting your time.
> My 10 year old code is crap and needs to be rewritten.
> I was just looking for an incremental understanding of
> what I did wrong in hopes of a quick incremental fix in
> lieu of that complete rewrite.
>
> See also: update, invalidate, and updateGeometry.
>
>>
>>
--
Bill Crocker
Work: (781) 937-1382 (WILM 6500)
Home: (978) 686-3277
More information about the Interest
mailing list