Reputation: 67
I am trying to upload a car mesh in QML but the mesh.obj(under qrc) apparently is too big, I added CONFIG +=resources_big to my .pro file but nothing changed.then I tried to call it from outside the application but it doesn't work. how can I resolve this? I am using qt5.10 and MinGW as a compiler.
Upvotes: 0
Views: 1399
Reputation: 49319
You don't want to put huge files in a qrc resource. That will result in a significant overhead. It will bloat your executable file, which takes up RAM, it will have to be additionally loaded into ram in Qt's resource virtual file system, an you will still to load it from there into ram in order to use it.
Put it out on the file system in the app folder, where you can load it from disk straight into RAM, significantly reducing memory usage.
Also, 3d meshes lend themselves to compression really well, and Qt's QByteArray
has compression support, so you might want to put that to work to reduce the deployment footprint.
Upvotes: 2