Details
-
Type:
Bug
-
Status: Reported
-
Priority:
P2: Important
-
Resolution: Unresolved
-
Affects Version/s: 6.2.0 Alpha, 5.15.0 RC2
-
Fix Version/s: None
-
Component/s: Core: Animation Framework
-
Labels:None
-
Environment:Fedora 34 x64, Xfce 4.16, GCC 11.1.1
-
Platform/s:
Description
Bug reproduction:
1. Create a new Qt Widgets project with a default QWidget or QMainWindow.
2. Write following codes to add the fade-in effect on that default Widget:
void MainWindow::show() { QPropertyAnimation *fadeInAnimation = new QPropertyAnimation(this, "windowOpacity"); fadeInAnimation->setDuration(2000); fadeInAnimation->setStartValue(0); fadeInAnimation->setEndValue(1); fadeInAnimation->start(QAbstractAnimation::DeleteWhenStopped); QWidget::show(); }
3. Compile and run.
I tested the same code in Microsoft Windows 10 with Qt MinGW 8.1.0 and it worked like a charm.
However, in Linux, the problem is that the fading animation will show properly only when I keep moving mouse cursor inside the window. Otherwise, the animation will be omitted. it will just wait for 2 seconds before showing up a totally opaque window directly.
I tested with Qt 6.2.0 Alpha and Qt 5.15.2 and this problem occurs in both of the versions.