Qt 6.11 is out! See what's new in the release
blog
How can I Implement collapse button for QDockWidget? (Code Please)
General and Desktop
3
Posts
3
Posters
3.0k
Views
1
Watching
-
how can I Implement collapse button for QDockWidget like what is in Microsoft VB or Microsoft VS?
P.S.
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?
-
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.