qtquick: Allow to use the MDI feature from QML

No need to use low level C++ API anymore
This commit is contained in:
Sergio Martins
2022-06-25 11:45:01 +01:00
parent 74a1520382
commit 95d711ece7
7 changed files with 183 additions and 5 deletions

View File

@@ -49,6 +49,9 @@ int main(int argc, char *argv[])
auto dw3 = new KDDockWidgets::Views::DockWidget_qtquick("Dock #3");
dw3->setGuestItem(QStringLiteral("qrc:/Guest3.qml"));
// See main.qml for how to add dock widgets from QML.
// Here's a low level C++ example just for educational purposes:
auto mainAreaView = KDDockWidgets::DockRegistry::self()->mainDockingAreas().constFirst();
auto mainAreaMDI = static_cast<KDDockWidgets::Views::MainWindowMDI_qtquick *>(mainAreaView);