Animate widget geometry inside layout
I have a problem with animating widget which is placed inside layout. The struct is like fallowing:
mainWidget with HBoxLayout
When I decrease the animatedWidget height, the layout does not refresh - otherWidget's top position is always the same, no matter which sizePlicy of animatedWidget do I choose. What is more, when I resize the window, the animatedWidget's height increases to the start value.
I want to get effect of collapsing widget. Animation code:
QPropertyAnimation *anim = new QPropertyAnimation(ui->animatedWidget, "geometry", 0);
QRect a = ui->animatedWidget->geometry();