[Qt-interest] Re : icons are not appearing in windows
BOUCARD Olivier
boucard_olivier at yahoo.fr
Mon Dec 7 14:41:08 CET 2009
Hi,
Don't forget that you don't need to distribute your images nor the .qrc, they are embedded into the executable.
For your problem its probably a lack of imageformats plugins (more info here) for reading both JPEG and PNG.
________________________________
De : Sujan Dasmahapatra <sujan.dasmahapatra at gmail.com>
À : qt-interest at trolltech.com
Envoyé le : Lun 7 Décembre 2009, 13 h 51 min 06 s
Objet : Re: [Qt-interest] icons are not appearing in windows
Hi David
My windlyzer.qrc file looks like this .This file is located in rc directory under the directory where the program runs.
and images are in images folder under the current directory.
This images are working fine in LINUX problem in VC++ windows.but the images are visible in windows in any icon or image editor. Suggestions from anyone would be appreciated . Thanks
///////////////////////////////////////////////////////////////////////////
<!DOCTYPE RCC><RCC version="1.1">
<qresource>
<file>../images/geom.jpg</file>
<file>../images/mesh.jpg</file>
<file>../images/geom.png</file>
<file>../images/mesh.png</file>
<file>../images/geom_mod.png</file>
<file>../images/mesh_mod.png</file>
<file>../images/copy.png</file>
</qresource>
</RCC>
////////////////////////////////////////////////////////////////////////
On Mon, Dec 7, 2009 at 3:10 AM, David Ching <dc at remove-this.dcsoft.com> wrote:
> "Sujan Dasmahapatra" <sujan.dasmahapatra at gmail.com> wrote in message
>>> news:b3126990912051730u4eec0502h30a990a462a15d06 at mail.gmail.com...
>
>> Friends
>> I am building QT application in vc++. Trying to put some icons on the
>> toolbars.But none of the icons are appearing.Can u suggest whats going
>> wrong.
>> geomAct = new
>>> QAction(QIcon(":/images/Aircarft1.bmp"),tr("Start&Geom"),this);
>> where this icon is present in images folder and also there's a qrc file
>> where i am specifying the icons path.
>>> I have tried with png,jpg etc but none of them are being visible.
>
>Is the path really right? Look in your .qrc file and see the line really
>contains "images"
>
> <qresource prefix="/images">
>
>-- David
>
>
>_______________________________________________
>Qt-interest mailing list
>Qt-interest at trolltech.com
>http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Software programmer
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091207/dc2c1b7c/attachment.html
More information about the Qt-interest-old
mailing list