-
Flickering
Hey guys,
I have a widget which I would like to hide a part of it (at least for a while). I am currently using "setMask" to hide part of the QDialog. Initially the entire widget is supposed to be invisible and slowly I "unmask" the widget. The problem is that when I call "show()", the entire widget flickers out showing the entire widget before disappearing.
I was wondering if there was anyway to avoid that "flicker"?
Thanks much
Regards,
Pembar
-
Re: Flickering
How fast are you unmasking the widget ?
-
Re: Flickering
Take a look at http://doc.trolltech.com/4.5.1/qwidget.html#paintEvent
It says that slow or complex widgets can use PaintEvent::region() to optimize its drawing operation. It returns a rectangular area that must be actually updated. Then you can set a clipping area with QPainter::setClipRegion() so the surrounding area remains unaffected, thus not flickering.