QAnimation框架:这里使用哪个属性

时间:2012-05-12 10:16:10

标签: qt qt4 qt4.8

最新的Qt Creator在启动时有动画效果,小部件从深色到浅色显示,我不知道我应该用Qt的动画框架使用哪个属性来制作类似的东西?

更新

好的,我尝试使用windowOpacity动画:

QPropertyAnimation *anim = new QPropertyAnimation(this, "windowOpacity", this);
connect(anim, SIGNAL(finished()), SLOT(animationFinished()));

anim->setDuration(1000);
anim->setStartValue(0.0);
anim->setEasingCurve(QEasingCurve::InOutQuad);
anim->setEndValue(1.0);

anim->start(QPropertyAnimation::DeleteWhenStopped);

但是,当我在XFWM4中禁用“显示合成”时,效果不起作用,但QtCreator仍然有效。

1 个答案:

答案 0 :(得分:0)

以下是properties

的列表

也许你正在寻找windowOpacity一个?

This问题/答案可能会对您有所帮助