Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Docking QDockWidget to main window and on top of other widgets
When I create a QDockWidget that floats on top of other widgets, the dock widget is not attached to main window, as a result if the main window moves the dock widget does not move along.
My overall plan is to create a button to hide/show the dock widget, as it floats on top of other widgets, it will not affect the view of everything else.
Floating Docks are windows and they are not moved with mainwindow as they might be
full screen or on another monitor so in most use cases it makes no sense to move with parent.
Im not sure what your question is, if any ?
other monitor so in most use cases it makes no sense to move with p
I see. I think my question would be how to make a QDockWidget sit on top of other widgets, in its docking mode and undocking mode... Thanks.
Im not sure what sit on top means.
When in floating mode, its a window and not inside the main app.
If you want to move the docks if mainwindow is dragged/moved then you need
virtual void moveEvent ( QMoveEvent * event )
and then manually adjust the docks you think is ok to move.
Sorry about the confusion... Let me try again...
When I dock a QDockWidget to main window, other widgets in the main window will resize to fit with the QDockWidget so that there is no overlapping. I'd like to let the QDockWidget overlap other widgets (and be on top) so that when it docks, other widgets will not resize. What can I do? Thanks.
It has areas to dock to, so im not sure how it could overlap other widgets already in