[Resolved] Image doesn't load on Screen... [Windows only]
-
wrote on 13 Nov 2012, 17:36 last edited by
I have compiled my application on Windows, using QtSDK.
I copy every .dll file to a folder including the executable file, and run the executable. The splashscreen shows normal, shows the image.After this test I copy the same folder to another computer, without SDK or anything of Qt and etc... I execute the application and the splashscreen appears but without the loading imagem!
The source to load the imagem is:
@
DialogSplashScreen::DialogSplashScreen(QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogSplashScreen)
{
ui->setupUi(this);
QGraphicsScene scene;
QLabel *gif_anim = ui->icon;
QMovie *movie = new QMovie(":/imagens/64/loading_1.gif");
gif_anim->setMovie(movie);
movie->start();
scene.addWidget(gif_anim);
setMaximumWidth( width() );
setMaximumHeight( height() );
setWindowFlags( ((windowFlags() | Qt::CustomizeWindowHint) & ~Qt::WindowCloseButtonHint) );
}
@On unix works fine, on windows where I compile the application works too, but in windows without anything of Qt or the project the image don't appears.
I don't know because I can't debug this problem or I don't know how to debug...thanks!
[edit : fixed typo in title, Eddy]
-
wrote on 13 Nov 2012, 18:07 last edited by
have you copied imageformats folder with your exe? http://doc.qt.digia.com/qq/qq10-windows-deployment.html
-
wrote on 13 Nov 2012, 18:11 last edited by
With same configurations on Linux works, every image is on binaria/executable file...
I will read this documentation to see what's can be!- in Linux my executable file has 28mb, for Windows has only 2mb!
-
wrote on 13 Nov 2012, 18:21 last edited by
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@ -
wrote on 13 Nov 2012, 18:43 last edited by
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?!
-
wrote on 13 Nov 2012, 18:50 last edited by
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
-
wrote on 13 Nov 2012, 18:54 last edited by
OK!
I will try using a dynamically way, that's come by default in QtSDK, and I will not need to recompile my application to add the line "qApp->addLibraryPath(*)".Checking here...
-
wrote on 13 Nov 2012, 19:03 last edited by
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! -
wrote on 13 Nov 2012, 19:10 last edited by
Man sorry!
Works for!!! I just copy a different copy of folder! Now I copy the right qt version of folder and Works very nice!
Thanks a lot!!! -
wrote on 13 Nov 2012, 19:55 last edited by
Well...
Now I'm having problems with SVG imagens inside my Project, on resources file!
As I already say, on linux works everthing nice! I'm having problems only in Windows... I will try find some dll that can be missing on my installer.Thanks all!
-
wrote on 16 Nov 2012, 11:17 last edited by
I don't know where is the problem!
I add the plugins folder with svg dll, gif dll, jpeg dll and others, but the SVG still not loading the image!
I load the svg file on QWebView and at Linux works as espected, but on Windows the svg file it's not loaded! -
wrote on 16 Nov 2012, 17:25 last edited by
Resolved:
Add to installer the plugins:
@
iconengines
sqldrivers
@
1/12