Unsolved Displaying of .jpeg graphics in runtime - missing photos
-
hi,
In my application Im displaying some .jpeg graphics as a pushbuttons (graphic .jpg on pushbuttons)
Im making simple visibility of button true or false.
I have a problem because after building I dont see any graphic files (only pushbuttons). Do You have any ideas what is the problem?[QT 5.8 on Windows 64 bit]
-
@cscibiorek
Hi can you show how you add the images ? -
I suspect path issues with your jpeg files. Are u specifying the absolute path or relative path ? R u bundling images in resources ? Is it
qtwidgets or qml ?[Edit: Both QML and QtWidgets are part of Qt ~kshegunov]
-
said in Displaying of .jpeg graphics in runtime - missing photos:
Windows 64 bit
Did you forget to deploy the imageformat plugin?
-
Hi,
I have no idea what are You asking about. Can You guide me? -
I think it boils down to:
- Can you show the code where you set the image on the button?
- Do you get the problem even when you start it from Qt Creator (or whatever IDE you use) or only when you start it from the .exe file?
-
First of all ,is your images present on qrc ?
http://doc.qt.io/qt-5/resources.html
if yes ?
are you running your application from qtcreator? or directly from binary ?
as @VRonin said, i think also that the problem is related to missing imageformat plugin,
have a look at this link :
http://doc.qt.io/qt-5/qtimageformats-index.html#deployment
When built, the Qt Image Formats plugins are located as dynamic libraries in the runtime plugin directory (typically plugins/imageformats), together with the default image format plugins. They may be deployed to the target system in the same way as other plugins, see the Deploying Plugins documentation
After understanding this first part ,you can use qt.conf:
http://doc.qt.io/qt-5/qt-conf.html
Hope this can help !