[Qt-interest] QIcon::fromTheme() under Windows

Tanguy Krotoff tkrotoff at gmail.com
Tue Feb 2 19:11:09 CET 2010


Hi all,

I'm having some hard time with QIcon::fromTheme() under Windows (Qt
4.6.1) as I couldn't find any example or code snippet.
Under Linux I have no problem to make it work.

My ultimate goal is to have a .qrc file under Windows that looks like that:
<qresource prefix="icons">
    <file alias="application-exit">icons/silk/stop.png</file>
    <file alias="document-open">icons/silk/folder_page.png</file>
    <file alias="document-save">icons/silk/disk.png</file>
    ...

and then inside my code a simple: QIcon::fromTheme("document-open");

>From the documentation, :/icons is supposed to be searched by QIcon::fromTheme()
Is there an example around that uses QIcon::fromTheme() with a .qrc
file? Is this suppose to work?

Regards,

-- 
Tanguy Krotoff <tkrotoff at gmail.com>
+33 6 68 42 70 24




More information about the Qt-interest-old mailing list