Introduce Option_MDINestable

Should allow MDI dock widgets to also accept drops.
Befor, each MDI "window" only had 1 dock widget, but now each
MDI "window" a layout of dock widgets.

This is implemented by nesting the actual dock widget inside
a wrapper drop area. This drop area gives the drop support.

There's still bugs and more tests to fix before merging.
This commit is contained in:
Sergio Martins
2022-01-13 22:49:26 +00:00
parent 22a9ce2596
commit 8c8f5a8fda
8 changed files with 125 additions and 1 deletions

View File

@@ -76,7 +76,9 @@ public:
Option_None = 0, ///< No option, the default
Option_NotClosable = 1, ///< The DockWidget can't be closed on the [x], only programmatically
Option_NotDockable = 2, ///< The DockWidget can't be docked, it's always floating
Option_DeleteOnClose = 4 ///< Deletes the DockWidget when closed
Option_DeleteOnClose = 4, ///< Deletes the DockWidget when closed
Option_MDINestable = 8 ///< When this dock widget is being shown in a MDI area it will also allow other dock widgets to be dropped to its sides and tabbed
/// Usually Each MDI "window" corresponds to one DockWidget, with this option each "window" will have a layout with 1 or more dock widgets
};
Q_DECLARE_FLAGS(Options, Option)
Q_ENUM(Options);