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

.qmlproject file question

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 7.0k 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.
  • K Offline
    K Offline
    kyleplattner
    wrote on last edited by
    #1

    What is the syntax for specifying that my qml files are both in the root directory and a subdirectory named components in the .qmlproject file.

    @/* File generated by QtCreator */

    import QmlProject 1.0

    Project {
    /* Include .qml, .js, and image files from current directory and subdirectories /
    QmlFiles {
    directory: "." //need to know how to add components folder here
    }
    JavaScriptFiles {
    directory: "."
    }
    ImageFiles {
    directory: "../Images"
    }
    /
    List of plugin directories passed to QML runtime */
    // importPaths: [ "../exampleplugin" ]
    }
    @

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gustavo
      wrote on last edited by
      #2

      Well, I don't know it. But it's interesting that all examples in Qt declare as directories for qml files only the current directory, although many of them have qml files in subdirectories and Qt Creator still find them. Maybe one only has to declare the root directory.

      Nevertheless, if a .qmlproject file uses the same syntax as a general qml file, then you can specify more than one directory in this manner:

      @
      QmlFiles {
      directory: [ 'a directory', 'another directory']
      }
      @

      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