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

Importing component to all files in project



  • Hi,
    I have decided to reorganize qml files in my project, sorting them in folders and subfolders. I however cannot now import some components. Example:

    /component.qml
    /folder/menu.qml
    

    And I need to use the component in menu. I can make it work by using

    import ".."
    

    in the menu file but I would have to use this in all subfolders and subsubfolders adding dots and slashes forever. Isn't there a way to make some qml files visible everywhere? I initially thought that adding it to qmldir might do the trick but doesn't seem so.
    Thanks and have a nice day.


Log in to reply