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 revision
Previous revision
qt:icons [2011/05/13 16:55] – [Custom theme using QIcon::fromTheme()] mithatqt:icons [2011/05/13 17:01] (current) – [Creating a Qt Resource for the theme] mithat
Line 269: Line 269:
 </RCC></code> </RCC></code>
  
-Once you have created the ''*.qrc'' file with the needed content, you will need to add it to your project. In Qt Creator, right-click the name of the project, select //Add Existing Files...//, and add the ''*.qrc'' file. After doing this, you can use Qt Creator's GUI-based resource manager to verify that all the icons have been correctly included.+Once you have created the ''*.qrc'' file with the required content, you will need to add it to your project. In Qt Creator, right-click the name of the project, select //Add Existing Files...//, and add the ''*.qrc'' file. After doing this, you can use Qt Creator's GUI-based resource manager to verify that all the icons have been correctly included.
  
 Note that in the set of icons I drew from, there were no 48x48 icons. To maintain best compatibility with Windows OSes, you ideally should include 48x48 icons as well((See http://msdn.microsoft.com/en-us/library/ms997636.aspx for a discussion of Windows XP icons and http://msdn.microsoft.com/en-us/library/aa511280.aspx for Windows 7.)). Note that in the set of icons I drew from, there were no 48x48 icons. To maintain best compatibility with Windows OSes, you ideally should include 48x48 icons as well((See http://msdn.microsoft.com/en-us/library/ms997636.aspx for a discussion of Windows XP icons and http://msdn.microsoft.com/en-us/library/aa511280.aspx for Windows 7.)).
  
-The pros and cons associated with this approach are essentially identical to [[#Explicitly build and bind icons at runtime]] above, but there is one important difference: you cannot combine this approach with [[#Custom theme using  QIcon::fromTheme()]] because the setting of icon themes is [[MainWindow-setActionIcon|dynamic]]: the last theme name you set is the theme with which all icons will be rendered. +The pros and cons associated with this approach are essentially identical to [[#Explicitly build and bind icons at runtime]] above. There is, however, one important difference: you cannot combine this approach with the [[#Custom theme using  QIcon::fromTheme()]] approach because the setting of icon themes is [[MainWindow-setActionIcon|dynamic]]: the last theme name you set is the theme with which all icons will be rendered. 
  
 ==== Code implementation ==== ==== Code implementation ====
qt/icons.1305305755.txt.gz · Last modified: 2011/05/13 16:55 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki