Hi,
I'm trying to implement a show/hide widget animation. The widget is a QDockWidget and therefore is inside the QMainWindowLayout.
Using QPropertyAnimation doens't seem to work, I got something looking like that :
m_listViewDock->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QPropertyAnimation* animation = new QPropertyAnimation(m_listViewDock, "geometry", m_listViewDock);
animation->setDuration(1000);
QRect g = m_listViewDock->geometry();
animation->setStartState(g);
g.setHeight(80);
animation->setEndState(g);
animation->start(QAbstractAnimation::DeleteWhenStopped);
Unfortunately it doesn't do anything. I tried with other properties (minimumHeight, fixedHeight), but same issue.
I thought I didn't setup my widget layout correctly using the designer but even if I play with minimum sizes I still don't have any result. What kind of size policy should I use if I want to play with the size?
I'm stuck, it would be so great if someone could clarify my issue. I'm not sure I'm doing anything wrong...
Thanks in advance for your help, Boris -