Usually, it's closed. "delete" isn't very well tested.
When it's deleted the container item becomes empty, so needs
to be resized to QSize(0,0) as well.
There's already a codepath for that but was too restrictive.
It now handles that case too.
Fixes#336
If the factory returned null for some dock widget, then the layout
would have holes. They need to be turned into placeholders, which
will be invisible.
Move the test into the QtWidgets guard. There's no point in making
it agnostic, since the bug is in the layouting.
Nested FloatingWindows already supported it, so make it consistent.
Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
TitleBar::isFloating() was returning false, while it should
have returned true.
Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.
There's already logic elsewhere that will hide the float button
in case there's nesting.
Fixes issue #96 and #44
They now honour Option_MDINestable.
Before they would bail out assuming they weren't in a MDI area.
Now they look further up the hierarchy to find our MDIArea, if any.
Dragging was always detecting the main window's drop indicator
overlay. Make it transparent for mouse events, so that
QWidget::childAt() doesn't pick it, and we can see the inner
drop areas.
Before we didn't need to update it because there was only 1
dock widget. But now, if there's more than one we need to set the
application's name instead of the dock widget's name as title.
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 is a public wrapper to MDILayoutWidget. The latter is private
and has internals we don't want to expose. Instead create a public
class with a thin API.
You no longer need to create a MainWindowMDI to have MDI support.
You can now have a normal MainWindow (with normal docking) and
add some dock widget that as a MDIArea as widget.