QML files in the file system
Files are stored without compression and encryption
- Faster to build but slower to deploy
- Saved without compression, so they take up more storage space.
- Easy to make user interface changes on the fly (just edit QML and restart)
QML files in resource file
Resources are compiled to the binary file making the executable file size bigger
- Slower to create, but faster to deploy.
- Takes up less storage space because resources are compressed by default.
- Since the size of the executable file is larger, at startup the program takes up more memory.
- You cannot change the user interface without recompiling
See the link in the next chapter Managing Resource Files Using the Qt Resource System for an example of a relative path.
I have no strong opinion, but here are some of my thoughts: If memory usage is a problem, you can go without built-in resources and make sure that you use dynamic component loading as much as possible. At the development stage, it is easier to work without built-in resources. If this is a client project, I would deliver the client as embedded qml files. This does not allow the client to customize the user interface code.
source share