[Resolved] Image doesn't load on Screen... [Windows only]
-
have you copied imageformats folder with your exe? http://doc.qt.digia.com/qq/qq10-windows-deployment.html
-
have you copied imageformats folder "on windows" with your exe?
@Plugins work differently to normal DLLs, so we can't just copy them into the same directory as our application's executable as we did with the Qt DLL. Qt applications look for plugins in a subdirectory within the their own directory, for instance, an image format plugin should be in the application's imageformats subdirectory, and a SQL driver plugin should be in the application's sqldrivers subdirectory.
So to make the JPEG plugin available to our showimg application, we just have to change directory to the application's directory and copy over the appropriate DLL:
mkdir imageformats
copy %QTDIR%\plugins\imageformats\qjpeg100.dll imageformats@ -
For every windows application that I compile I will need to add a folder /imageformats?
If I put this folder structure:
@
/install_app_folder
Application.exe
file0.dll
...
file5.dll
/imageformats
qgif4.dll
qico4.dll
qjpeg4.dll
qmng4.dll
qsvg4.dll
qtiff4.dll
@On my Application code Can I add this line?
@
qApp->addLibraryPath( QDir::currentPath() );
@Or I will not need change nothing on my application?!
-
bq. For every windows application that I compile I will need to add a folder /imageformats?
Yes. For each dynamically compiled app on windows
bq. On my Application code Can I add this line?
You don't need in folder structure like you have posted. "." is included in any windows app
-
I try this:
@
/install_app_folder
Application.exe
file0.dll
...
file5.dll
/imageformats
qgif4.dll
qico4.dll
qjpeg4.dll
qmng4.dll
qsvg4.dll
qtiff4.dll
@and this:
@
/install_app_folder
Application.exe
file0.dll
...
file5.dll
/plugins/imageformats
qgif4.dll
qico4.dll
qjpeg4.dll
qmng4.dll
qsvg4.dll
qtiff4.dll
@Nothing change! The problem persists!
The imagens that I set in Form Files works as expected! -
-