[Interest] Flickering when animating QWidget resize

Konstantin Tokarev annulen at yandex.ru
Fri Aug 25 21:59:45 CEST 2017

25.08.2017, 22:45, "André Pönitz" <apoenitz at t-online.de>:
> On Fri, Aug 25, 2017 at 10:26:22AM -0700, Thiago Macieira wrote:
>>  On Friday, 25 August 2017 09:26:22 PDT Michael Jackson wrote:
>>  > In our application, we are attempting to create a "fly out" effect with a
>>  > QWidget based window and when the animation happens the QWidget flickers
>>  > badly. We are usig QProperty animation in an attempt to achieve the effect.
>>  > Is this not a good idea? Is there a setting that we are missing perhaps?
>>  It's not a good idea to animate QWidgets. They were not designed for that.
> And still it works.
>>  At the very least, make your animations inside a QGraphicsView. Better yet,
>>  use QML and/or OpenGL.
> Simply calling QWidget::update() from a timer works just fine for
> simple effects like e.g. the hover effect on the Examples and
> Tutorials pages on Qt Creator's Welcome screen.
> There's no need for QGraphicsView, let alone OpenGL for that.

Still, animations with "moving widgets" work better when there are no really moving widgets,
e.g. when widgets content is renderend into image/pixmap before animation starts.
Bonus points if this image/pixmap is somehow "hw-accelerated" to achieve fast blits.

All this stuff is not easy to get right from the start, and on many devices including modern PCs
and many embedded things the only way to achieve this kind of "acceleration" is OpenGL

> Andre'
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


More information about the Interest mailing list