Important: Please read the Qt Code of Conduct -

[SOLVED]Embedding images in exe file

  • Hello!

    I was wondering if it is possible to embed files (like icons, images, etc) in the exe file? I know you can use the NetworkAccessManager to download these files, but I need a non-internet required solution. Also I don't want to save them in the application folder to use as resource files because I don't want the user to modify the icons like he wants.

    Thank you in advance.

  • Hi!
    Why don't use resource files?

  • Moderators

    QRC resources are compiled into the binary, they don't need to be stored in the application folder.

  • Thank you. I did not know that :)

  • But if your question is how to create resource files, then then here is the steps:
    File->New File or Project->files and classes:Qt->Qt Resource file
    then you can add any files into this resource file and it will be compiled into binary file.

    oops. I think it was not necessary post :)

Log in to reply