User Tools

Site Tools


qt:icons

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
qt:icons [2011/05/13 16:55] – [Custom theme using QIcon::fromTheme()] mithatqt:icons [2011/05/13 16:55] – [Custom theme using QIcon::fromTheme()] mithat
Line 207: Line 207:
 ===== Custom theme using  QIcon::fromTheme() ===== ===== Custom theme using  QIcon::fromTheme() =====
  
-The static function ''QIcon::fromTheme()'' used above can also be used with custom, locally defined icon themes that are placed into Qt Resource files((This idea comes from http://tkrotoff.blogspot.com/2010/02/qiconfromtheme-under-windows.html)). Themes built and defined this way can be used across all platforms. To accomplish this we need to do three things: Create a custom icon theme, create a Qt Resource with the theme, and implement the code needed to use the custom theme.+The static function ''QIcon::fromTheme()'' used above can also be used with custom, locally defined icon themes that are placed into Qt Resource files((This idea comes from http://tkrotoff.blogspot.com/2010/02/qiconfromtheme-under-windows.html)). Themes defined this way can be used across all platforms. To accomplish this we need to do three things: Create a custom icon theme, create a Qt Resource with the theme, and implement the code needed to use the custom theme.
  
 To describe the process, I will use an example of a custom theme that provides icons in a variety of sizes for our example application. The icons themselves are taken from the raucously popular, public domain Tango Project((http://tango.freedesktop.org/Tango_Desktop_Project)) using files provided in Ubuntu's 10.10 tango-icon-theme package((http://packages.ubuntu.com/maverick/tango-icon-theme)). Because unlike Bill Bruford I am not good at naming things((Bruford, Bill. "Who Managed the Manager?" In //Bill Bruford: the autobiography : Yes, King Crimson, Earthworks, and more.// London: Jawbone Press, 2009. 60-72. )), I call the custom theme, "TangoMFK". To describe the process, I will use an example of a custom theme that provides icons in a variety of sizes for our example application. The icons themselves are taken from the raucously popular, public domain Tango Project((http://tango.freedesktop.org/Tango_Desktop_Project)) using files provided in Ubuntu's 10.10 tango-icon-theme package((http://packages.ubuntu.com/maverick/tango-icon-theme)). Because unlike Bill Bruford I am not good at naming things((Bruford, Bill. "Who Managed the Manager?" In //Bill Bruford: the autobiography : Yes, King Crimson, Earthworks, and more.// London: Jawbone Press, 2009. 60-72. )), I call the custom theme, "TangoMFK".
qt/icons.txt · Last modified: 2011/05/13 17:01 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki