Problem with link resources to executable file
-
Hello!
I have a problem with resources link. I have a splash screen in my app (and other pictures). Resources.qrc file has all of them. In pro-file I have follow line:
@RESOURCES = ./resources/resources.qrc@
In main.cpp file I do follow:
@int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(resources);
QApplication app(argc, argv);
...
QSplashScreen splash(QPixmap(":/images/splash.jpg"));
...@And it works properly on my laptop. But when I execute my app on other machine I have no resources loaded...
Could you tell me what I do wrong?
Thanks in advance!
UPD:
The same behavior without line
@Q_INIT_RESOURCE(resources);@Also I tried to compile my project with VS2008 (using special Qt build and vs-addin). And again this problem: it works properly on my laptop and there no images on other machines.
-
Hi Andrey.
Really, you must provide Qt JPEG plugin(libqjpeg.so or libqjpeg.dll) with your app, if you want work with JPEG images.
-
Qt has image plugins which are enabled for compilation when it finds the appropriate system library. In this case libjpeg.
If the loading of the jpeg does not work on that machine then you are missing the jpeg library and if you compiled Qt yourself you may need to recompile Qt. On Linux you need something like libjpeg62-dev. If you are using something else, google for it or tell us what system you have and you may get lucky that someone else is running it that reads this thread :)