I want to animate a QPushButton resize, is there a way to know when the button will be resized and what will be the final size so i can set the final value for the animation?
Thanks
I want to animate a QPushButton resize, is there a way to know when the button will be resized and what will be the final size so i can set the final value for the animation?
Thanks
Quick look at the Qt4 documents show a class QPropertyAnimation that can animate properties of widgets. Below is example code in qt documents itself that shows you can animate geometry and control initial and final values.
QPropertyAnimation *animation = new QPropertyAnimation(myWidget, "geometry");
animation->setDuration(10000);
animation->setStartValue(QRect(0, 0, 100, 30));
animation->setEndValue(QRect(250, 250, 100, 30));
animation->start();
Check if it works for you.