I tried to do something like in the PropertyAnimation example of the Qt docs, but it disappears after a split second too.
Does anybody have an idea how to approach this?
button.show();
QPropertyAnimation animation(&button, "geometry");
animation.setDuration(10000);
animation.
setStartValue(QRect(0,
0,
100,
30));
animation.
setEndValue(QRect(250,
250,
100,
30));
animation.start();
QPushButton button("Animated Button", mParent);
button.show();
QPropertyAnimation animation(&button, "geometry");
animation.setDuration(10000);
animation.setStartValue(QRect(0, 0, 100, 30));
animation.setEndValue(QRect(250, 250, 100, 30));
animation.start();
To copy to clipboard, switch view to plain text mode
Thanks,
Bookmarks