Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Importing component to all files in project
Qt 6.11 is out! See what's new in the release blog

Importing component to all files in project

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 267 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hitokage
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved