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();
QPropertyAnimation showTrevwAnime(trevwCompileInfo,"geometry");
QRect startRect=trevwCompileInfo->rect();
QRect finalRect=startRect;
finalRect.setWidth(100);
showTrevwAnime.setStartValue(startRect);
showTrevwAnime.setEndValue(finalRect);
showTrevwAnime.start();
To copy to clipboard, switch view to plain text mode
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!!!!
Bookmarks