[Qt-interest] Delayed Initialization in custom widget plugin
Lars Amsel
lars.amsel at signalion.com
Thu Aug 6 08:13:49 CEST 2009
Christopher Boger wrote:
> I have a custom widget plugin (for use in Designer) that works great,
> except that it could use some performance optimization. My widget has a
> lot of properties that affect the widget's appearance that can be
> customized in designer. In designer, this is great, you want to see the
> effect of your changes immediately. However, at runtime this isn't so
> good as a lot of the drawing is redundant.
If you want your widget to stop redrawing you could use
setUpdatesEnabled(bool). als long as updatesEnabled() is false the widget wont
receive any update() or paint() events. Reenabling automatically calls
update() to repaint th widget.
cheers
Lars
More information about the Qt-interest-old
mailing list