qt:toward_robust_icon_support
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
qt:toward_robust_icon_support [2011/05/12 09:13] – created from much longer predecessor mithat | qt:toward_robust_icon_support [2018/08/03 19:46] (current) – mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Icons and Actions ====== | ====== Icons and Actions ====== | ||
- | This report discusses different ways of binding icons to actions in Qt desktop applications and provides motivation for exploring | + | <WRAP center round important 60%> |
+ | This report is based on Qt 4.7 and is thus < | ||
+ | </ | ||
+ | |||
+ | This report discusses different ways of binding icons to actions in Qt desktop applications and provides motivation for exploring approaches to robust icon implementations. The following was written against Qt 4.7.1 and Qt Creator 2.1.0 and assumes the reader has some familiarity with Qt/C++ development. | ||
===== Options ===== | ===== Options ===== | ||
Line 7: | Line 11: | ||
In Qt, there are (at least) five different approaches to binding icons((http:// | In Qt, there are (at least) five different approaches to binding icons((http:// | ||
- | ==== Using Qt Resources in Qt Designer ==== | + | ==== Option 1: Use Qt Resources in Qt Designer ==== |
The path-of-least-resistance for binding icons to actions when developing Qt applications with Qt Designer((Throughout, | The path-of-least-resistance for binding icons to actions when developing Qt applications with Qt Designer((Throughout, | ||
Line 38: | Line 42: | ||
* Not consistent with system icon theme | * Not consistent with system icon theme | ||
- | ==== Explicitly build and bind icons at runtime ==== | + | ==== Option 2: Explicitly build and bind icons at runtime ==== |
It's possible to build '' | It's possible to build '' | ||
Line 109: | Line 113: | ||
* Requires lots of coding | * Requires lots of coding | ||
- | ==== QStyle' | + | ==== Option 3: QStyle' |
An alternative to using icon resources is provided by the '' | An alternative to using icon resources is provided by the '' | ||
Line 141: | Line 145: | ||
* Limited range of icons | * Limited range of icons | ||
- | ==== System | + | ==== Option 4: Use the system |
On X11 systems, Qt lets you access all the icons that are part of the system icon theme using the static function '' | On X11 systems, Qt lets you access all the icons that are part of the system icon theme using the static function '' | ||
Line 206: | Line 210: | ||
QIcon:: | QIcon:: | ||
- | ==== Custom | + | ==== Option 5: Use a custom |
The static function '' | The static function '' |
qt/toward_robust_icon_support.1305191636.txt.gz · Last modified: 2011/05/12 09:13 by mithat