Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.1.0 , 5.1.1
-
None
-
Windows 7
-
b7b573ad6d9f50ebff87f5c6204225366a1675bd
Description
With following code, opacity is not animated. Instead after timeout it is set visible. This works in 4.8.4. Attached is full example
#include <QApplication> #include <QPropertyAnimation> #include <QMainWindow> #include <QPushButton> #include <QLabel> #include <QHBoxLayout> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget *mainWindow = new QWidget(0, Qt::WindowFlags(Qt::FramelessWindowHint)); QHBoxLayout *l = new QHBoxLayout(); QPushButton *b = new QPushButton("Quit"); QObject::connect(b, SIGNAL(clicked()), qApp, SLOT(quit())); l->addWidget(b); l->addWidget(new QLabel(QT_VERSION_STR)); mainWindow->setLayout(l); mainWindow->resize(QSize(500,500)); QPropertyAnimation* fadeInAnimation = new QPropertyAnimation(mainWindow, "windowOpacity"); fadeInAnimation->setDuration(1500); fadeInAnimation->setStartValue(0.0); fadeInAnimation->setEndValue(1.0); fadeInAnimation->start(); mainWindow->show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-28531 WA_TranslucentBackground widget issues
- Closed
-
QTBUG-29010 A frameless Window with opacity animation turns black at the end of animation.
- Closed