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
Forum Updated to NodeBB v4.3 + New Features

Module URI different than folder structure in cmake

Scheduled Pinned Locked Moved Unsolved General and Desktop
cmakeqmlqt6modules
1 Posts 1 Posters 280 Views 1 Watching
  • 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 1 Sept 2023, 13:51 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

    1/1

    1 Sept 2023, 13:51

    • Login

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