[Interest] Problem with QPixmap.

Syam Krishnan syamcr at gmail.com
Sun Apr 19 05:07:54 CEST 2015


On 04/18/2015 10:33 AM, Igor Mironchik wrote:
> Hi, William.
>
> On Sat, 18 Apr 2015 01:54:27 +0300, william.crocker at analog.com
> <william.crocker at analog.com> wrote:
>> Have you added the .png file to your .qrc file.
> Yes, I have.

I have a similar usage in my project and my qrc file is like this:

<RCC>
     <qresource prefix="/">
         <file>images/pick.png</file>
         <file>images/undo.png</file>
     </qresource>
</RCC>


In the code, I have:

button->setIcon(QIcon(":/images/pick.png"));


Thanks,

Syam




More information about the Interest mailing list