retractable side panel
-
Hi I would like to create a retractable side panel, for example like the ones in QtCreator
or
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?
-
Hi
You can check out DockWidgets.
They provide dockable panels.
https://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html -
@mrjj
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. -
Hi
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
https://code.woboq.org/qt5/qt-creator/ -
This post is deleted!
-
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 -
You can probably use something like: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
-
@VRonin
this is very interesting.