Unable to see images after deploymenmt .
-
I am using Qt for desktop ,I am able to compile and run the applications. I am getting problem with showing images, it is only showing png images, but not displaying jpeg and gif images all other.Can anyone tell how to solve this problem.
-
Probably image plugin issue, but without more data from you, I cannot say for sure. We need code samples, directory structure, platform info etc.
-
[quote author="sierdzio" date="1343045712"]Probably image plugin issue, but without more data from you, I cannot say for sure. We need code samples, directory structure, platform info etc.[/quote]
when i was searching for it, i found that the supported formats(for toolbutton icons, mainwindow icons, etc) were .png, .tiff, .jpg(jpeg doesn't work) and a few others i can't recall
-
I am using resource file named "resources.qrc".
In resource file I have given prefix "/resources/images" and using main.jpg as alias. But the original path is different. It is working for .png files but not working for .jpg@Image {
id: image1
width: parent.width
height: parent.height
fillMode: Image.Stretch
smooth: true
z: 0
opacity: 0.940
source: "qrc:///resources/images/main.jpg"
}@ -
Ah, QML. I had a similar issue, too. Reinstalling my system was the solution :P but that is not optimal. I'm almost certain Qt's image plugins are to be blamed, but I have no definite answer.
-
[quote author="AlekseyOk" date="1343047105"]Hi!
You should deploy appropriate image formats plugins too from %QTDIR%/plugins/imageformats.
For jpeg in your case[/quote]Thank you for this info... though could you tell how to find/compile the required files
-
See "this related thread":http://qt-project.org/forums/viewthread/17342 (its about another image plugin for .ico images, but it applies to your problem as well). The plugin libs can be found in the QTDIR/plugins/imageformats directory as mentioned before.
-
i am reading lots of images form disk those are having different format ,here i am unable to read all.because they all are randomly generated by other media resources and creating image named "Folder.jpg.pnj,etc".so converting image format is not the solution for me.
-
i am trying to add plugin to my project in main.cpp like
QString sDir = QCoreApplication::applicationDirPath();
app.addLibraryPath(sDir+"/plugins");and all base directory of plugin to the resource directory.
-
When your testing your application on your development PC the plugins are present (because you have you Qt SDK). When you deploy your application at a customer PC they probably won't have the Qt SDK installed so you need to provide all the dlls your application requires (e.g. QtGui.dll, QtCore.dll.. AND the image plugins). The image plugins need to be present in the following way: YourProgramsInstallationFolder/plugins/imageformats/qjpeg.dll .....