examples|qtquick: Show a .qml dockwidget as well

The customtitlebar example only had C++ dock widgets. Now it
has a .qml one too.

While testing issue #325
This commit is contained in:
Sergio Martins
2022-11-15 18:39:36 +00:00
parent 8ff052e219
commit d64ff8c6cd
3 changed files with 34 additions and 0 deletions

View File

@@ -23,5 +23,20 @@ ApplicationWindow {
anchors.fill: parent
uniqueName: "MyMainLayout"
KDDW.DockWidget {
id: dock4
uniqueName: "dock4"
source: "qrc:/Guest4.qml"
onIsFocusedChanged: {
console.log("Dock4 focus changed to: " + isFocused);
}
}
Component.onCompleted: {
// The other 3 dock widgets are created via C++ in main.cpp
// For illustration purposes, here's a .qml version. Maybe it's te preferred form even.
addDockWidget(dock4, KDDW.KDDockWidgets.Location_OnBottom);
}
}
}