Here you can find answers to questions about how the board works. Use the links or search box below to find your way around.
You are probably using relative paths to your images such as:
QPixmap("icons/fileopen.png");If you move your application or start with a different working directory but leave the images where they were the relative path to them will have changed and your program won't be able to open the file containing the image because the path is incorrect.
To solve this case use one of the following (in order from best solution to least good one):
QPixmap(QCoreApplication::applicationDirPath()+"/icons/fileopen.png");
You probably didn't deploy image plugins with your application. You need to copy the contents of plugins/imageformats directory of your Qt installation to the imageformats subdirectory of the directory where you deployed the application binary.
For instance if you deployed the application to C:\Program Files\MyApp
, you need to copy the plugins to C:\Program Files\MyApp\imageformats
.
Imageformat plugins are libraries called "qjpeg", "qsvg", "qtiff", etc.