QML - Images are not uploaded to the deployed version of the application.

I wrote a Qt / QML application, and at compile time and working on my own operating system, everything is fine. But when I move this software to another computer, none of the photos are downloaded. For example, here is my background picture:

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

this image is loaded when I run the executable file (which is created in release mode) on my system (development environment system), but when I move this file and its dlls to another system (without installing Qt), the background image does not work Download . I also tried relative addressing instead of the resource system. but the problem remains. How can I solve this strange behavior?

+4
source share
1 answer

You are missing out on Qt plugins that handle JPEG image formats. The easiest way to solve this problem is to copy qjpeg4.dll to the same working directory as your executable file.

+2
source

Source: https://habr.com/ru/post/1435033/


All Articles