PDA

View Full Version : Qt 5 QSplitter Animation



harinlen
27th June 2013, 07:17
Hi, I get some stucks with QSplitter as well. I have two widget in the splitter and I set one of the size of control as 0 to hide it.
Now, I'd like to show the hide one with an expand anime. I use QPropertyAnimation but it doesn't work.


QPropertyAnimation showTrevwAnime(trevwCompileInfo,"geometry");
QRect startRect=trevwCompileInfo->rect();
QRect finalRect=startRect;
finalRect.setWidth(100);
showTrevwAnime.setStartValue(startRect);
showTrevwAnime.setEndValue(finalRect);

showTrevwAnime.start();

I've know the code above is wrong. But I have no idea how to do this. I have read about QAnimationFramework, can someone help me? Thanks a lot!!!!

blueSpirit
24th September 2013, 08:07
see http://qt-project.org/forums/viewthread/29316

(don't place animation on the stack!)