Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-9968

The current specification for the QmlProject file format

    XMLWordPrintable

Details

    • [Specification] QmlProject file

    Description

      import QmlProject //required
      
      
      Project { //required
          mainFile: "content/App.qml"  //required
      
          mainUiFile: "content/Screen01.ui.qml"  //optional
          QDS.mainUiFile: "content/Screen01.ui.qml"  //optional
      
          QmlFiles { //optional
              directory: "content" //optional
          } //optional
      
          QmlFiles { //optional
              directory: "imports" //optional
              files: [] //optional
              MCU.copyQmlFiles: false //optional
          }
      
          JavaScriptFiles { //optional
              directory: "content" //optional
              files: [] //optional
          }
      
          JavaScriptFiles { //optional
              directory: "imports"//optional
              files: [] //optional
          }
      
          ImageFiles { //optional
              directory: "content" //optional
              files: [] //optional
          }
      
          ImageFiles {
              // Specify the prefix for images declared within the current node
              MCU.base: "photos"
              MCU.prefix: "pictures"
      
              files: ["photos/hires/house.png", "map/small.png"]
          }
      
          ImageFiles {//optional
              directory: "asset_imports"//optional
              files: [] //optional
          }
      
          Files { //optional
              directory: "asset_imports" //optional
              filter: "*.conf" //optional
              files: ["qtquickcontrols2.conf"] //optional
          }
      
          Environment { //optional
             //Can contain any value key pair to define enviroment
              QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf" //optional
              QT_AUTO_SCREEN_SCALE_FACTOR: "1" //optional
              QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT: "1" //optional
              QT_LOGGING_RULES: "qt.qml.connections=false" //optional
              QT_ENABLE_HIGHDPI_SCALING: "0" //optional
          }
      
          QDS.Environment {} //optional
      
          qt6Project: true //optional
          QDS.qt6Project: true //optional
      
          /* List of plugin directories passed to QML runtime */
          importPaths: [ "imports", "asset_imports" ] //optional
      
      
      
          /* Required for deployment */
          targetDirectory: "/opt/UntitledProject154Qt6" //optional
          QDS.targetDirectory: "/opt/UntitledProject154Qt6" //optional
      
          qdsVersion: "4.1" //optional
          QDS.qdsVersion: "4.1" //optional
      
          quickVersion: "6.4" //optional
          QDS.quickVersion: "6.4" //optional
      
          /* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */
          widgetApp: true //optional
          QDS.widgetApp: true //optional
      
          /* args: Specifies command line arguments for qsb tool to generate shaders.
             files: Specifies target files for qsb tool. If path is included, it must be relative to this file.
                    Wildcard '*' can be used in the file name part of the path.
                    e.g. files: [ "content/shaders/*.vert", "*.frag" ]  */
          ShaderTool { //optional
              args: "-s --glsl \"100 es,120,150\" --hlsl 50 --msl 12" //optional
              files: [ "content/shaders/*" ] //optional
          }
          QDS.ShaderTool {
          } //optional same as ShaderTool
      
          multilanguageSupport: true  //optional
          QDS.multilanguageSupport: true  //optional
      
          supportedLanguages: ["en"]  //optional
          QDS.supportedLanguages: ["en"]  //optional
      
          primaryLanguage: "en"  //optional
          QDS.primaryLanguage: "en"  //optional
      
          //MCU specific
      
          ImageFiles {  //optional
              // Specify the prefix for images declared within the current node
              MCU.base: "photos"  //optional
              MCU.prefix: "pictures"  //optional
              // User options for images declared within the current node
              MCU.resourceAnimatedSprite: true //optional
              MCU.resourceAnimatedSpriteFrameWidth: 32 //optional
              MCU.resourceAnimatedSpriteFrameHeight: 32 //optional
              MCU.resourceAnimatedSpriteOptimizations: "CropWithPartialUpdates" //optional
              MCU.resourceCachePolicy: "OnStartup" //optional
              MCU.resourceCompression: false //optional
              MCU.resourceImagePixelFormat: "Automatic"
              MCU.resourceOptimizeForRotation: false //optional
              MCU.resourceOptimizeForScale: false //optional
              MCU.resourceRuntimeAllocationType: 3 //optional
              MCU.resourceStorageSection: "QulResourceData" //optional
              //Experimental options
              MCU.Experimental.resourceAlignment: 128 //optional
              MCU.Experimental.resourceSplitImageOptimization: false //optional
      
              files: ["photos/hires/house.png", "map/small.png"] //optional
          }
      
          MCU.Config {
              addDefaultFonts: true //optional
              autoGenerateGlyphs: true //optional
              complexTextRendering: true //optional
              controlsStyle: "MyApp.MyCustomStyle" //optional
              debugBytecode: false //optional
              debugLineDirectives: false //optional
              defaultFontFamily: "Comic Sans" //optional
              defaultFontQuality: "VeryLow" //optional
              fontCachePrealloc: true //optional
              fontCachePriming: false //optional
              fontCacheSize: 12800 //optional
              fontEngine: "Static" //optional
              fontFilesCachePolicy: "OnStartup" //optional
              fontFilesRuntimeAllocationType: 3 //optional
              fontFilesStorageSection: "QulFontResourceData" //optional
              fontHeapPrealloc: true //optional
              fontHeapSize: -1 //optional
              fontVectorOutlinesDrawing: true //optional
              glyphsCachePolicy: "NoCaching"
              glyphsRuntimeAllocationType: 2 //optional
              glyphsStorageSection: "QulFontResourceData"
              maxParagraphSize: 200
              maxResourceCacheSize: 3000 //optional
              maxResourceCacheSize: [ //optional
                  [1000, 128],
                  [2000, 129],
                  [3000]
              ]
              mergeStaticTextGlyphs: true //optional
      
              //Global resource properties (duplicated in ImageFiles)
              resourceOptimizeForRotation: false //optional
              resourceCachePolicy: "NoCaching" //optional
              resourceCompression: true //optional
              resourceImagePixelFormat: "RGB332" //optional
              resourceOptimizeForRotation: false //optional
              resourceOptimizeForScale: false //optional
              resourceRuntimeAllocationType: 129 //optional
              resourceStorageSection: "QulResourceData" //optional
          }
      
          InterfaceFiles {
              MCU.qmlImports: ["Personal.Constants", "personal.Util"] //optional
              files: ["backend/interface.h"] //optional
              directory: "backend" //discouraged
          }
      
          MCU.Module {
              uri: "custom.module" //optional
              generateQmltypes: true //optional
          }
      
          ModuleFiles { //optional
              files: [ "imports/Constants/constants_module.qmlproject"  ] //optional
              directory: "imports/Constants" //discouraged
              MCU.qulModules: [  "Controls", "ControlsTemplates", "Timeline", "Shapes" ] //optional
          }
      
          FontFiles {
              files: ["fonts/MyFont.ttf"] //optional
              directory: "fonts" //discouraged
          }
      
      }
      

      The QDS. prefix is optional for backwards compability only.
      Since QDS 4.2 the templates should contain the QDS prefix for all QDS specific variables.

      More examples for Files:

          Files { //optional
              filter: "qmldir" //optional
              directory: "." //optional
          }
      
          Files { //optional
              filter: "*.ttf;*.otf" //optional
          } 
      
          Files { //optional
              filter: "*.wav;*.mp3" //optional
          }
      
          Files { //optional
              filter: "*.mp4" //optional
          }
      
          Files { //optional
              filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag" //optional
          }
      
          Files { //optional
              filter: "*.qsb" //optional
          }
      
          Files { //optional
              filter: "*.mesh" //optional
              directory: "asset_imports"//optional
          }
      
          Files {//optional
              filter: "*.qml" //optional
              directory: "asset_imports" //optional
          }
      
        
      

      https://doc.qt.io/QtForMCUs/qtul-qmlproject-reference.html

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thohartm Thomas Hartmann
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes