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

Allow writing of .qmlproject file in QmlProjectManager

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • QML Project Manager
    • None
    • 8
    • QDS Berlin - 2023 Week 3/4, QDS Berlin - 2023 Week 5/6, QDS Berlin - 2023 Week 7/8, QDS Berlin - 2023 Week 11/12, QDS Berlin - 2023 Week 13/14
    • 66d72433a (qds/dev)

    Description

      Currently the QmlProjectmanager can only read a project.
      We should add the ability to also write the .qmlproject file.

      import QmlProject 1.1
      
      Project {
      
          //mainFile: "content/App.qml"
          mainFile: "content/MyTestFormForm.ui.qml"
      
          qt6Project: true
      
          qdsVersion: "3.9"
      
          quickVersion: "2.15"
      
         qtForMCUs: false
         
       /* If any modules the project imports require widgets (e.g. QtCharts), widgetApp must be true */
          widgetApp: true
      
         forceFreeType: false
      
          Environment {
              QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf"
              QT_AUTO_SCREEN_SCALE_FACTOR: "1"
              QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT: "1"
              QMLSCENE_CORE_PROFILE: "true" // Required for macOS, but can create issues on embedded Linux
              QT_LOGGING_RULES: "qt.qml.connections=false"
              QT_ENABLE_HIGHDPI_SCALING: "0"
              /* Useful for debugging
             QSG_VISUALIZE=batches
             QSG_VISUALIZE=clip
             QSG_VISUALIZE=changes
             QSG_VISUALIZE=overdraw
             */
          }
      
          /* Required for deployment */
          targetDirectory: "/opt/NewTemplate"
      
          /* List of plugin directories passed to QML runtime */
          importPaths: [ "imports", "asset_imports" ]
      
          multilanguageSupport: true
          supportedLanguages: ["en"]
          primaryLanguage: "en"
      
               /* 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" ]  */
         //fileSelectors: [ "WXGA", "darkTheme" ]
          fileSelectors: [ ]
      
      
          /* Include .qml, .js, and image files from current directory and subdirectories */
          QmlFiles {
              directory: "content"
          }
      
          QmlFiles {
              directory: "imports"
          }
      
          JavaScriptFiles {
              directory: "content"
          }
      
          JavaScriptFiles {
              directory: "imports"
          }
      
          ImageFiles {
              directory: "content"
          }
      
          ImageFiles {
              directory: "asset_imports"
          }
      
          Files {
              filter: "*.conf"
              files: ["qtquickcontrols2.conf"]
          }
      
          Files {
              filter: "qmldir"
              directory: "."
          }
      
          Files {
              filter: "*.ttf;*.otf"
          }
      
          Files {
              filter: "*.wav;*.mp3"
          }
      
          Files {
              filter: "*.mp4"
          }
      
          Files {
              filter: "*.glsl;*.glslv;*.glslf;*.vsh;*.fsh;*.vert;*.frag"
          }
      
          Files {
              filter: "*.mesh"
              directory: "asset_imports"
          }
      
          Files {
              filter: "*.qml"
              directory: "asset_imports"
          }
      
      }
      

      All properties but the File filters are always present. The comments are mot preserved but regenerated from a template.

      See:

      QmlBuildSystem

      bool qtForMCUs() const;
      bool qt6Project() const;
      bool forceFreeType() const;
      bool widgetApp() const;
      QStringList shaderToolArgs() const;
      QStringList shaderToolFiles() const;
      QStringList importPaths() const;
      Utils::EnvironmentItems environment() const;
      QStringList customImportPaths() const;
      QString primaryLanguage() const;
      bool multilanguageSupport() const;
      QStringList supportedLanguages() const;
      QStringList customImportPaths() const;
      QStringList customFileSelectors() const;

      QString mainFile() const;
      QString mainUiFile() const;
      Utils::FilePath mainFilePath() const;
      Utils::FilePath mainUiFilePath() const;

      std::unique_ptr<QmlProjectItem> m_projectItem; (contains all the filters)

      QmlBuildSystem should get a function that writes a new .qmlproject file with the current settings.

      Attachments

        There are no Sub-Tasks for this issue.

        Activity

          People

            hancerliqt Burak Hancerli
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 3 days Original Estimate - 3 days
                3d
                Remaining:
                Time Spent - 1 week, 1 day, 3 hours, 30 minutes Remaining Estimate - 4 days, 4 hours, 30 minutes
                4d 4h 30m
                Logged:
                Time Spent - 1 week, 1 day, 3 hours, 30 minutes Remaining Estimate - 4 days, 4 hours, 30 minutes
                1w 1d 3h 30m