[Solved] Images (Ressources) disappear after deployment
-
Hi,
in my application (Qt Creator 3.1.1) I use QLabel elements on the MainWindow to visualize some .svg images. It took me some time, but now it works fine in the IDE and also in the build directories (debug and release). When I look into the .exe file with an editor I also find a text passage ":/images/receiver.svg" in it. This is exactly the path to the ressource, so I would think it is correctly stored in the executable.
However, after my deployment (using WiX Toolset v3.8), these images are not shown in my application. The application starts, it works fine so far, but the images are not there. Checking with "Dependency Walker 2.2.6", it seems to report "ieframe.dll" and "shlwapi.dll" to be missing. For the "ieframe.dll" google tells me, that this dll is nonsense and I should not have it on the computer.
Can anyone tell me, what am I missing for have the svg images correctly shown in my application?
That would be great, thanks!
Stephan -
Hi,
Did you deploy the image formats plugins ?
-
@SGaist Hi, I think I did... In the installed directory there are several dlls and also directories with further dlls. I suppose they are also found, otherwise I would expect serious error messages. One of the directories is called "imageformats", are you referring to this? In there are the "qsvg.dll" and the "qsvgd.dll" (debugging) among others. Would you say that's fine for .svg ressources?
From my perspective this looks fine, even I have no idea so far, how I can sort them out? I mean, what's the process to remove all those dlls that are not needed. The net promotes testing it for basically each and every dll which seems to be a tedious work for days... In case the "Dependency Walker" is the king's way, I could image doing for a later (more stable / final) release.
Stephan
-
Did you check that wiki entry ? It shows nicely how you should do the deployment on Windows
-
Well, yes, I was skimming over that before, but partly it reads like a lot of trial-and-error, like starting the application and checking if everything is fine. That's not too easy when things like ressource bitmaps are not shown. Then you have to go through a whole test cycle before you can say that the application is properly working. I left this for the real release, later on...
Anyway, at this point it's mainly my problem that something is missing, not that there is a lot too much. Apparently it looks to me, that there is some function not available that should, and that's why the ressource image is not shown?!?
Kommando zurück... I have removed the documentation of my workaround here. Simply because it doesn't work. Still, on my test system I don't get any error messages, but the images are not visualized, even I try to set them "manually" by doing such:
pic = QPixmap(); pic.load( ":/images/receiver.png" ); ui->labImageStationary->setPixmap( pic );
This works good in the development but not at all on the test system - both Windows 7... Any more ideas???
Stephan
-
Ok, what I did now is the following: I have removed the .svg ressources and converted them to .png graphics. Now I don't do the loading via the program any more but now I do it only via the settings in the GUI editor. I don't think I have changed anything else of relevance, but now it works. So to me it looks it only has to do with the format, that svg wasn't working while png is. I thougth I had checked that already before, but I may have overseen something. So for now that's the solution, thanks for the reflection platform. ;-)
Stephan