Qt not displaying PNG images on Linux
- by ereOn
Hi,
I have a software written using Qt which is meant to work on both Windows and Linux.
I use PNG images as icons for my QActions, embedded in a resource.
I have the following tree directory:
/
resources/
icons.qrc
image.png
Here is the content of icons.qrc:
<RCC>
<qresource prefix="/resources" lang="fr">
<file alias="image.png">image.png</file>
</qresource>
</RCC>
I declare my QIcon like that:
QIcon(":/resources/image.png")
Under Windows, it works well but on Linux (I only tried on Ubuntu 10.4 so far), the images aren't displayed.
Is there anything special I have to do for this to work ? Is this a configuration problem ?
Thank you.