Icons are not visible when installing Qt application on end user machine ( Windows )
Hello,
I am junior software developer. I develop descktop applications using Qt application framework for 3 years. Currently I develop application that I putted(added) icons to it’s menues’ QActions, to buttons, to frames and windows, to textedit. I’ve created .qrc resource file and added icons from the resource file. I need to install the application on end user Windows XP(7) machine installing only .exe file and .dll libraries from the framework. When I install and launch the application on end user machine the icons are not visible, not loaded.The problem is that I have the icons visible only at the machine (OS) where I compiled and built the application and when putting the .exe file with needed .dlls(QtGui4.dll, QtCore4.dll,mingw10.dll,libgcc_s_dw2_1.dll) on the end user machine ( installation) the icons are not visible,not loaded.
I have tried to use external binary resources ( I’ve compiled .qrc file with rcc and putted QResource::registerResource(…) ) and also I have tried compiled in resources and also tried to put icons from separate files. I made all the needed according to Qt Reference Documentation – the Qt Resource System. My icons are added to to .qrc resource file.
But I see icons when I launch the application only at machine where I build the application and the icons are invisible when installing on end user machine. I build for Windows XP, 7. I also tried to install on end user machine the Qt SDK and copied my .exe file and .rcc file to directory ../Qt/2010.05/qt/bin, in such a case the icons are visible(loaded). But I don’t need the users(clients) installs something else and heavy besides my .exe file and .dlls of Qt you understand.
Please help, advise what is the problem with icons ( resources ), when you will help me I’ll help you too from my experience with Qt.
Pavel.
Re: Icons are not visible when installing Qt application on end user machine ( Window
Make sure that you add the image qt codecs plugins that correspond to your icons (jpg svg etc) along with the other qt dlls.
Re: Icons are not visible when installing Qt application on end user machine ( Window
Also check that resources are compiled into exe
Re: Icons are not visible when installing Qt application on end user machine ( Window
Hi
Thank you for your replies
How can I check that resources were compiled to exe?
If I see icons when I launch the application on the developer machine does not that say that resources were compiled?
About plugin:
What is a plugin? Where can I get it?
No In Qt Reference documentation - Qt Resource system there is no word about need in any plugin
Standart SDK is enought?
Added after 12 minutes:
So what does it mean?
That I can't compile my application ones and install ( deploy ) on another machines with needed windows dlls with the icons seen?
I begin to think the Qt developers make this so as not to make possible to redistribute made programs under GPL?
Re: Icons are not visible when installing Qt application on end user machine ( Window
So what does it mean?
That I can't compile my application ones and install ( deploy ) on another machines with needed windows dlls with the icons seen?
I begin to think the Qt developers make this so as not to make possible to redistribute made programs under GPL?
Re: Icons are not visible when installing Qt application on end user machine ( Window
Quote:
How can I check that resources were compiled to exe?
A cpp file with the qrc file prefix should be compiled as part of the project.
Quote:
What is a plugin? Where can I get it?
look under QTDIR\plugins\codecs
Re: Icons are not visible when installing Qt application on end user machine ( Window
Please don't multi post.
Merging.
Re: Icons are not visible when installing Qt application on end user machine ( Window
Hi
The resources were compiled to exe sure there is coded images as hexadecimal numbers in .cpp file
Regards codecs... perhaps it is the problem? I will check the plugins, but No - so Why when I deploy exe to ../Qt/2010.05/qt/bin the icons are visible?
Added after 4 minutes:
I have tried also to deploy with dlls from plugins/codecs , plugins/imageformats, plugins/iconengines but still I can't see icons
I can see only when I install full Qt SDK and I deploy to qt/bin directory
But we understand the end user should not install full Qt SDK so as to use application
why such a problem?>
Re: Icons are not visible when installing Qt application on end user machine ( Window
Are the Qt Dlls and your exe in the same folder?
If not, you need to set the environment path as well.
Re: Icons are not visible when installing Qt application on end user machine ( Window
Sure My dll's and exe and all files are in one bundle(folder)
sure dll's for the application, .exe, application service files installed in one folder to HDD to end user, the application is succeed to launch but icons not visible in places that I have included them
Re: Icons are not visible when installing Qt application on end user machine ( Window
Do you have the following line in your pro file:
RESOURCES = <you_resource_filename>.qrc
Also, can you post one example line from your code, where you are accessing an image?
Re: Icons are not visible when installing Qt application on end user machine ( Window
Hi
Yes, sure
the dlls, exe are in one folder, installed at end user machine to one folder
I have added resources in .pro and also " registered " in main.cpp as it is explainded in Qt reference documentation
Here is the example of image including from file generated by .uic after I've added icons in Qt Designer:
Code:
actionTell_a_friend->setIcon(icon1);
actionContact_us
= new QAction(MainWindow
);
actionContact_us
->setObjectName
(QString::fromUtf8("actionContact_us"));
actionContact_us->setIcon(icon2);
actionQuit
= new QAction(MainWindow
);
actionQuit
->setObjectName
(QString::fromUtf8("actionQuit"));
...
Re: Icons are not visible when installing Qt application on end user machine ( Window
your app should be deployed like this:
<app>.exe
dlls that you listed before
imageformats\qico4.dll
hope this helps
Re: Icons are not visible when installing Qt application on end user machine ( Window
Try renaming the icons to not include spaces.
Re: Icons are not visible when installing Qt application on end user machine ( Window
hey!
Thank you very much
Yea I try today to deploy with imageformats and iconengines dlls
I fill it succeed!
:cool:
Thank you shnitzel
you understand!
Re: Icons are not visible when installing Qt application on end user machine ( Window
Hello
I deployed today with /plugins/imageformats folder
It works only when I deploy may application exe, main Qt dlls and imageformats folder on windows
How can I deploy on MacOS, Ubuntu, Symbian , Maemo?
Thanks
Pavel
Re: Icons are not visible when installing Qt application on end user machine ( Window
Thank you all
I succeed to intstal the application with icons
http://www.realvirtualdevelopment.co.nr
Pavel