Hi!
I want to animate changing of background color in a window using QPropertyAnimation
animation = new QPropertyAnimation(this, "palette");
animation->setDuration(100);
animation->setStartValue(start);
animation->setEndValue(stop);
animation->setLoopCount(-1);
animation->start();
QPalette start;
start.setColor(QPalette::Window, QColor(1,255,0));
QPalette stop;
stop.setColor(QPalette::Window, QColor(255,255,255));
animation = new QPropertyAnimation(this, "palette");
animation->setDuration(100);
animation->setStartValue(start);
animation->setEndValue(stop);
animation->setLoopCount(-1);
animation->start();
To copy to clipboard, switch view to plain text mode
But after "starting" the animation nothing happen...
Is there a way to change the background color of window by simple calling some property? (Without overloading or creating own properties by Q_PROPERTY)
Bookmarks