.png images don't show when deploy
I making a simply GUI with Qt, and have 2 images (splashscreen and a label).
When I run the program inside Qt it work and the images too.
But when I deploy the program with "windeployqt" command the images don´t work.
Code of the spash screen:
QSplashScreen * splashScreen = new QSplashScreen; splashScreen->setPixmap(QPixmap(":/images/7Guard.png")); splashScreen->move((ScreenWidth/2)-(splashScreen->width()/2), (ScreenHeight/2)-(splashScreen->height()/2)); splashScreen->show();
In the label I choose the file "7Guard7.png" from the resources file in the pixmap proprieties of the label.
Code of the resources files:
<RCC> <qresource prefix="/images"> <file>7Guard.png</file> <file>7Guard7.png</file> </qresource> </RCC>
The png files are part of the exe file of your program. So, if the png files are not part of the deployed program they were very probably already absent during the build of the release version, before the call to windeployqt.
What happens when you run the release version "outside of Qt"?
If I try to run the release version outside the Qt it will crash saying:
This application failed to start because it could not find or load the Qt plataform plugin "windows" in "". Reinstall the application may fix the problem.