qtquick: Allow to call addDockWidget() from QML

This commit is contained in:
Sergio Martins
2021-04-05 22:56:08 +01:00
parent e7d37402d7
commit 748243f512
3 changed files with 42 additions and 0 deletions

View File

@@ -80,6 +80,14 @@ ApplicationWindow {
color: "pink"
}
}
Component.onCompleted: {
// Add dock4 to the Bottom location
addDockWidget(dock4, KDDW.KDDockWidgets.Location_OnBottom);
// Add dock5 to the left of dock4
addDockWidget(dock5, KDDW.KDDockWidgets.Location_OnRight, dock4);
}
}
function toggleDockWidget(dw) {