Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How can I Implement collapse button for QDockWidget? (Code Please)
MathSquare last edited by
how can I Implement collapse button for QDockWidget like what is in Microsoft VB or Microsoft VS?
NO third party tools, please. I use Gnu/Linux and my program is under the GPL.
Subclass QDockWidget, add a QPushButton, hide/show stuff inside the dock and manipulate the dock's width/height when it's clicked. Not much to say about it I think?
Sam last edited by
You can also have a look at "QPropertyAnimation Class":http://qt-project.org/doc/qt-5.0/qtcore/qpropertyanimation.html if you want to provide any animation effect.