Toolbar(SelectionToolBar)
是允许的LeftToolbarArea
。并且目前是隐藏的。当我将鼠标移到应用程序的左边框时,它会附带定义不透明度的动画。这工作正常。但问题是当我将鼠标移到鼠标上时toolbuttons
,所有工具按钮都会隐藏,尽管我可以单击按钮,但它可以工作。只有工具按钮显示(查看/查看)被隐藏。我怀疑“fade_effect”超出了范围。有什么解决办法吗?
bool evenfilter(...)
{
...
QGraphicsOpacityEffect* fade_effect = new QGraphicsOpacityEffect();
ui->SelectionToolbar->setGraphicsEffect(fade_effect);
QPropertyAnimation *animation = new QPropertyAnimation(fade_effect, "opacity");
animation->setEasingCurve(QEasingCurve::InOutQuad);
animation->setDuration(3000);
animation->setStartValue(0.01);
animation->setEndValue(1.0);
animation->start(QPropertyAnimation::DeleteWhenStopped);
//animation->start();
ui->SelectionToolbar->show();
}