Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QML - Images don't load in deployed version of application

I wrote a Qt/QML application and every thing is OK during compile time and running on my own system. But when I move this software to an another computer none of pictures loads. for example here is my background picture:

    Image{
    id:background;
    source:"qrc:/qml/MobnaPC/images/back.jpg"
}

this image loads when I run the executable file ( which is created in release mode ) in my system ( development environment system ) but when I move this file and its associated dlls to another system( without Qt installed) the background image doesn't load.
I also tried relative addressing instead of resource system. but the problem remained. How can I solve this strange behavior?

like image 237
s4eed Avatar asked Nov 04 '22 15:11

s4eed


1 Answers

You are missing the Qt plugins that handle JPEG image formats. The simplest way to solve this is to copy the qjpeg4.dll into the same working directory as your executable.

like image 151
stackunderflow Avatar answered Nov 12 '22 16:11

stackunderflow