Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Module URI different than folder structure in cmake

Module URI different than folder structure in cmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
cmakeqmlqt6modules
1 Posts 1 Posters 269 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.
  • B Offline
    B Offline
    BeneG
    wrote on last edited by
    #1

    In the "Building a reusable QML module" documentation it says
    "The subdirectories are structured to correspond to the QML module’s URI, but with the dots replaced by slashes. That’s the same logic the engine uses when it searches for a module in the import paths. Following this subdirectory structure helps tooling." (https://doc.qt.io/qt-6/cmake-build-reusable-qml-module.html)
    Does that mean that there is no way i can have my URI different from my folder structure?
    What i want to have is something like this:
    /app
    /CMakeLists.txt
    /main.qml
    /modules/module1/CmakeLists.txt
    /modules/module1/.qml/.cpp/*.h

    and in my main.qml i want to import the following:

    import AppName.Module1
    
    // Do stuff with that
    
    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