How does qt implement a fade window? That is, for example, when it is opened, he is gradually showing from the top down, the closing time from the bottom to the beginning of the hour
Http://stackoverflow.com/questions/19087822/how-to-make-qt-widgets-fade-in-or-fade-out
Fade in Your Widget
W is your widgetQgraphicsopacityeffect *Eff= New Qgraphicsopacityeffect(This);W-Setgraphicseffect(Eff);Qpropertyanimation *A= New Qpropertyanimation(Eff,"Opacity");A->setduration (350 ); a->setstartvalue ( 0a->setendvalue (1< Span class= "pun"); a->seteasingcurve ( qeasingcurve::inback); ->start (qpropertyanimation ::deletewhenstopped
Fade out Your Widget
W is your widgetQgraphicsopacityeffect *Eff= New Qgraphicsopacityeffect(This);W-Setgraphicseffect(Eff);Qpropertyanimation *A= New Qpropertyanimation(Eff,"Opacity");A-Setduration(350);A-Setstartvalue(1);A-Setendvalue(0);A-Seteasingcurve(qeasingcurve::OutBack); A-start(qpropertyanimation::deletewhenstopped); Connect(a,SIGNAL(finished()),this,SLOT( Hidethiswidget())); //Now implement a slots called hidethiswidget () to does//things like hide any background dimmer, etc.
How does qt implement a fade window (which is displayed from top to bottom when opening)