QtDesignStudio/QMLProjectFileFormat: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Created page with "With Qt Design Studio 4.5 the project structure did change. The default import path is now "./" the root folder of the project, since this better matches with the requirements of the QML compiler and tooling around QML. Before there were usually two import "imports" and "assets_imports". Also relative URLS between modules are now the same in QDS and in the compiled C++ application. The default project module is now in ./ProjectName instead of imports/ProjectName. Asse...")
 
No edit summary
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
With Qt Design Studio 4.5 the project structure did change.
=== With Qt Design Studio 4.5 the project structure did change. ===
 
With Qt Design Studio 4.5 we changed the project structue. The goal was to have only a single import path (./) at the root of the project. This is better in line with the QML compiler and QML tooling. (https://doc.qt.io/qt-6/qtqml-qtquick-compiler-tech.html)
 


The default import path is now "./" the root folder of the project, since this better matches with the requirements of the QML compiler and tooling around QML.
The default import path is now "./" the root folder of the project, since this better matches with the requirements of the QML compiler and tooling around QML.
Before there were usually two import "imports" and "assets_imports". Also relative URLS between modules are now the same in QDS and in the compiled C++ application.
Before there were usually two import "imports" and "assets_imports". Also relative URIs between modules are now the same in QDS and in the compiled C++ application.


The default project module is now in ./ProjectName instead of imports/ProjectName.
The default project module is now in ./ProjectName instead of imports/ProjectName.
Line 9: Line 12:
QtQuick3D assets are now in Generated/QtQuick3D and Generated.Effects instead of e.g. assets_imports/QtQuick3DAssets.
QtQuick3D assets are now in Generated/QtQuick3D and Generated.Effects instead of e.g. assets_imports/QtQuick3DAssets.


Adjusting the project strucuture for legacy projects:
Because of the different import paths the (relative) URIs of resouces like meshes are not the same when running the project in Qt Design Studio and the resulting C++ application.
The solution is to either avoid referencing assets (files like .mesh files) between modules or moving to the new project strucuture.


=== Adjusting the project strucuture for legacy projects: ===
Move the project module from "./import/ProjectName" to "./ProjectName". The same applies to any other module in imports.
Move the project module from "./import/ProjectName" to "./ProjectName". The same applies to any other module in imports.
The URI is not affected by this.
Move all modules from "./assets_imports" to "./Generated". Unfortly this also requires adjusting the import URIs throughout the project.


Move all modules from "./assets_imports" to "./Generated" unfortly this also requires adjusting the import URI throughout the project.
===  Project structure since Qt Design Studio 4.7: ===
ProjectName -                                    ### Folder containing the project
            ProjectName                          ### Default QML module with the same name as the project
            ContentProjectName                    ### Folder with the main QML files. Contains the project name, so it beomes unique, since in the C++ project this is a QML module
            Generated                            ### Folder containing all generated QML modules from 3D import, content libarry and design systems

Revision as of 11:19, 12 November 2024

With Qt Design Studio 4.5 the project structure did change.

With Qt Design Studio 4.5 we changed the project structue. The goal was to have only a single import path (./) at the root of the project. This is better in line with the QML compiler and QML tooling. (https://doc.qt.io/qt-6/qtqml-qtquick-compiler-tech.html)


The default import path is now "./" the root folder of the project, since this better matches with the requirements of the QML compiler and tooling around QML. Before there were usually two import "imports" and "assets_imports". Also relative URIs between modules are now the same in QDS and in the compiled C++ application.

The default project module is now in ./ProjectName instead of imports/ProjectName.

Assets are now imported to "Generated" instaed of "assets_imports". QtQuick3D assets are now in Generated/QtQuick3D and Generated.Effects instead of e.g. assets_imports/QtQuick3DAssets.

Because of the different import paths the (relative) URIs of resouces like meshes are not the same when running the project in Qt Design Studio and the resulting C++ application. The solution is to either avoid referencing assets (files like .mesh files) between modules or moving to the new project strucuture.

Adjusting the project strucuture for legacy projects:

Move the project module from "./import/ProjectName" to "./ProjectName". The same applies to any other module in imports. The URI is not affected by this.

Move all modules from "./assets_imports" to "./Generated". Unfortly this also requires adjusting the import URIs throughout the project.

Project structure since Qt Design Studio 4.7:

ProjectName -                                     ### Folder containing the project
           ProjectName                           ### Default QML module with the same name as the project
           ContentProjectName                    ### Folder with the main QML files. Contains the project name, so it beomes unique, since in the C++ project this is a QML module
           Generated                             ### Folder containing all generated QML modules from 3D import, content libarry and design systems