What is the best approach when deploying qml files in an embedded application?

I am working on an embedded project, a user interface developed in QML and backend logic developed using DB / other system calls in C++ / Qt .

What is the best approach for deploying qml files?

Does it .qrc to .qrc (as a resource) and compile into an executable application?

or

Download QML files from the import folder ( QML files will be deployed)?

or any other suggestion?

I have about 200 QML files.

+6
source share
1 answer

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.

+5
source

All Articles