Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
retractable side panel
Hi I would like to create a retractable side panel, for example like the ones in QtCreator
What comes to mind is simply creating a widget that holds the panel, then add it or remove it from the layout when the button is pressed. But I would like to ask if there is a better or more efficient way, for example if I have to add7remove a very complex panel I am afraid of having lag or a non-fluid ui.
Can anyone tell me which is the best way?
You can check out DockWidgets.
They provide dockable panels.
hello, thanks for the answer, I looked at the example Dock Widgets Example but it is not what I would like to do, with a QDockWidget I can create a floating panel, I need it to disappear and reappear, exactly like in the QTcreator screenshots I sent.
ok, there is not exactly a widget like the one Creator uses.
I think its a customized DockWidget but i have not verified it.
Hence i suggested using docks that as a base. I know you are not interested in the floating part
but the docked part and the ability to stack more than one in the same area seemed handy.
You could go and see what Creator uses
This post is deleted!
From the QTCreator source code it seems that it simply call the setVisible metood that the "Side panel" inherits from QWidget.
Actually it works, but all doubts about the performance of the graphic interface remain.
Pl45m4 last edited by
You mean, because Qt Creator just hides the parts and doesnt delete them?
If the Widget would get deleted after hiding to MenuBar, all the content would be gone, if you restore it. The console output works, even if you hide the console window
VRonin last edited by
You can probably use something like: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
this is very interesting.