QQuickItem::parentChanged(QQuickItem *parent) passes the *new*
parent, not *this*
Fixes#243 which is actually invalid, but uncovered this bug.
For #243 you can just use sender(), or connect to a lambda that
captures the dock widget.
When using MainWindowOption_HasCentralFrame we have a persistent
central frame which is never destroyed. When restoring a layout
we shouldn't create it, as it exists already.
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>
Use -DKDDockWidgets_X11EXTRAS=OFF to disable it, if you don't want
to link to Qt5X11Extras.
I've added a new option instead of relying on auto-detection, because
I want to make it difficult to disable it when on X11, it's opt-out.
X11Extras is needed when window managers don't have compositors, in
that case we use icons without transparency.
When restoring a maximized window, calling QWidget::showNormal()
on it wouldn't set it's previous non-maximized size.
QWidget::normalGeometry() doesn't have a setter, so use private API.
So it can be overridden by QtQuick, since there's no "normal geometry"
for QWindow.
Also useful to workaround window manager bugs in a class derived from FloatingWindow.
So users can workaround bugs in window managers / Qt, such as QTBUG-95478
The custom behavior needs to be done in a FloatingWindow sub-class,
as a generic workaround which doesn't break other window managers isn't
possible
You can now set an arbitrary widget as "central widget".
It's similar to MainWindowOption_HasCentralFrame, however the widget
won't be detachable and won't show tabs.
Similar to what you'd get with QMainWindow central widget concept.
Example:
QWidget *myWidget = new MyWidget();
mainWindow->setPersistentCentralWidget(myWidget);
Fixes#225
Even if they are "the same file" it's always good to not have packages
trying to install over the same files.
Since we don't want users to have to change their existing
#include <kddockwidgets/DockWidget.h>
We install the qt6 includes in include/kddockwidgets-qt6/kddockwidgets
and change the cmake target INTERFACE_INCLUDE_DIRECTORIES to be
"${_IMPORT_PREFIX}/include/kddockwidgets-qt6"
so everything is transparent for the user