Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to load leveled qml file into main qml?



  • Hi, maybe my question is bit awkward. But I need to load leveled qml into main.qml as shown below picture. But its not loading. Any help please?

    • Main.qml
    • MainPageBG.qml
    • mainui Folder
      • HeaderWidget.qml
      • MapWidget.qml

    0_1521036762022_qmlLoader.jpg

    Folder View:
    0_1521036809254_FolderView.jpg


  • Moderators

    @NTMS
    did i understand you correctly that you want to show the MapWidget component as overlay on top of all the other elements?
    Since you are using ApplicationWindow already you can use the attached properties ApplicationWindow.contentItem or Overlay.overlay as the parent of the item

    Also note that in your code the Loader item is stacked behind MainPageBG element



  • @raven-worx thanks. my loader item is not stacked behind any other element. And its working.


Log in to reply