c++ - Fade out and fade in with a new image in Qt creator -


I am new wit Qt when I start my application, I will try to erase a white image and then on my start menu Some coupons should be shown in the widget.

  StartMenu :: StartMenu (QWidget * parent): QMainWindow (parent), UI (new UI :: start menu) {UI- & gt; SetupUi (this); Set windoffs (qt :: window | qt :: frameless windowhunt); // hide frame window UI- & gt; Central-Widget-> Set stylesheet ("image: url (: / gui.png);"); QGraphicsOpacityEffect * opacityEffect = new QGraphicsOpacityEffect (this); OpacityEffect- & gt; SetOpacity (1.0); UI- & gt; Centralwidget-> SetGraphicsEffect (opacityEffect); QPropertyAnimation * anim = New QPropertyAnimation (this); Anim- & gt; SetTargetObject (opacityEffect); Anim- & gt; SetPropertyName ("Opacity"); Anim- & gt; SetDuration (4000); Anim- & gt; SetStartValue (opacityEffect-> Opacity ()); Anim- & gt; SetEndValue (0); Anim- & gt; SetEasingCurve (QEasingCurve :: OutQuad); Anim- & gt; Start (QAbstractAnimation :: KeepWhenStopped); }  

So far I have written this code, but this code has been faded out of the whole central builder. Hope you guys will understand my question and help me.


Comments