[Interest] Flickering when animating QWidget resize
apoenitz at t-online.de
Fri Aug 25 20:48:59 CEST 2017
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.
More information about the Interest