June 24, 2011

soroush soroush
Robot Herder
786 posts

[SOLVED] Using standard icons of OS for Qt application

 

Hi,

I would like to use some common icons for my app. like undo, redo, save and so on. In KDE all applications use same icons. I found that all icons, and generally all graphic resources are in in /usr/share (/usr/share/icons/oxygen/). I would like to use them in my app and when user changes theme of workspace or icons of workspace, my application theme changes too. Perhaps something cross-platform like QSettings that do job… does Qt provide something for this?

3 replies

June 24, 2011

HuXiKa HuXiKa
Lab Rat
83 posts

QIcon::fromTheme [doc.qt.nokia.com]

 Signature 

If you can find faults of spelling in the text above, you can keep them.

June 24, 2011

soroush soroush
Robot Herder
786 posts

thnx :-)

June 24, 2011

steno steno
Ant Farmer
133 posts

You could also look at QStyle, which has a funciton called standardIcon which takes a enumerated type of the specific icon the current style uses.

 
  ‹‹ adjusting size between 2 widgets within a gridlayout (beginner question)      capture http request before sending with QtWebkit framework ››

You must log in to post a reply. Not a member yet? Register here!