So the lambda can have more advanced usage and inspect the
target layout before allowing or disallowing the drop.
For our use case, we want to limit max 3 dock widgets side by side,
for example.
This change allows you to switch tabs via the context menu. The context
menu only shows up if you click on the empty area beside the tabs.
Can be tested with `--allow-switch-tabs-via-menu` option in the example.
Fixes#232
Signed-off-by: Waqar Ahmed <waqar.ahmed@kdab.com>
Don't use a transparent floating window by default.
This matches QtWidgets behaviour.
It's only use would be to get round corners, but doesn't work well
with Window's drop shadow
Makes our internal widgets not override QWidget::paintEvent(),
which gives full power to the user to stylesheets.
Was already possible, but required the user to override the
internal widgets via the widget factory
For issue #146
When clicking on the TitleBar's close button it closes all the
dock widgets in the tab, by default. With the new option it will
close only the current tab
It's an internal knob you can turn so that setFloating(false)
doesn't show the dockwidget. Only adding this flag in case you need
to support both KDDW and QDW at the same time, or during porting/evaluation.
Fixes#125
Which sets Qt::WindowStaysOnTopHint for floating windows.
Usually unneeded, as floating windows are Qt::Tool with a transient
parent, but in case you're using Flag_DontUseUtilityFloatingWindows
then you might want (or not) to keep them above.
This gives a lot of power to the user to disallow tabbing two dock
widgets, while still allowing them to be docked side by side. As
this can't be achieved with affinities.
Instead of adding API which might not be enough soon, just allow
the user to pass a lambda and implement his very custom requirement.
Fixes#91
Native dragging is much better as Windows deals with crossing screen
boundaries, there's no reason not to want that.
Client-side moving is buggy within Qt, depending on the HDPI setting.
Fixes#86Fixes#78
Introduced Flag_TitleBarHasMinimizeButton for it.
It implies Flag_DontUseUtilityFloatingWindows too, since Qt::Tool
don't appear in the task bar.
example: kddockwidgets_example -k
Allows to improve on Flag_HideTitleBarWhenTabsVisible.
Flag_HideTitleBarWhenTabsVisible will hide title bar regardless
if the window is floating or docked. By enabling Flag_AlwaysTitleBarWhenFloating
the title bar will only be hidden if docked.
Demo: ./bin/kddockwidgets_example -qt
Fixes#64
When clicking on a TitleBar the focus will be redirected to either:
- Last widget that had focus inside the scope
- To the DockWidget. Implies the user setting a guest widget that
accepts focus
Fixes: #56