QTProperty动画未正确完成

QTProperty动画未正确完成,qt,animation,Qt,Animation,我想有一个按钮与点击事件,打开一个动画帧。 在我升级到Qt5 Beta 2之后,帧在末尾停止,留下一条细线 我有一个QProperty动画,每次单击按钮时,我都会执行以下操作: if(this->isOpen) { this->animation->setStartValue(this->openRect); this->animation->setEndValue(this->closedRect); } else { thi

我想有一个按钮与点击事件,打开一个动画帧。 在我升级到Qt5 Beta 2之后,帧在末尾停止,留下一条细线

我有一个QProperty动画,每次单击按钮时,我都会执行以下操作:

if(this->isOpen) {
    this->animation->setStartValue(this->openRect);
    this->animation->setEndValue(this->closedRect);
} else {
    this->animation->setStartValue(this->closedRect);
    this->animation->setEndValue(this->openRect);
}
this->isOpen = !this->isOpen;

this->animation->start();
openRect
(300x300)和
closedRect
(0x100)在init中设置,并且从不更改

有人知道发生了什么吗

编辑


当我在窗口外单击时,小行消失了

最小大小如何?Qt中的小部件具有最小大小。在给定的最小大小下,无法调整其大小。您可以操作小部件的最小大小。这就是为什么你可以在Close上像那样调整你的帧大小我将minimumsize设置为0,0。但是没有结果我注意到当我在窗口外点击时,小条消失了!