Running out of memory



  • I want to start off by saying I'm sorry if this was a previous post but I cannot find anything...

    I'm building a project that has a lot of different images that I'm using and I'm load the 40 or so PNGs into a qrc but when all of them are in there the program won't compile because its running out of memory. Each PNG is only about 1MB (give or take .5MB). I can compile the program with some in there but not all. Unfortunately all are need for my final.

    Does anyone have any suggestions as to a fix for this issue?? I know my system has plenty of memory but maybe I need to allocate more for the project (if that's even possible to do). I failed to mention that this needs to be a stand alone application for my final so I cannot simply just call from my HDD.



  • Your problem is likely to be that a single qrc file with 40MB of binary data encoded as C code is too large for the compiler. Create several qrc files and add a few files to each, then add all the qrc files to the project.

    Embedding such a large amount of data in the executable is probably not a good idea. Have you considered simply storing it in the program directory?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.