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:47] – [System theme using QIcon::fromTheme()] mithatqt:icons [2011/05/13 16:50] – [Caveat] mithat
Line 199: Line 199:
  
 ==== Caveat ==== ==== Caveat ====
-QIcon's determination of the system icon theme is at the time of this writing not reliable under Linux -- at least not under Openbox; GNOME and Xfce are yet to be tested. A possible workaround is to use as yet undefined ''HeroicMeasures()''™ to suss out the actual icon theme and then set it((http://doc.qt.nokia.com/4.7/qicon.html#setThemeName, http://doc.qt.nokia.com/4.7/qicon.html#themeName)) in the constructor:+QIcon's determination of the system icon theme is at the time of this writing not reliable under Linux -- at least not under Xfce, Openbox, Fluxbox, and IceWM; GNOME seems to work as expected((http://bugreports.qt.nokia.com/browse/QTBUG-19268)). A possible workaround is to use as yet undefined ''HeroicMeasures()''™ to suss out the actual icon theme and then set it((http://doc.qt.nokia.com/4.7/qicon.html#setThemeName, http://doc.qt.nokia.com/4.7/qicon.html#themeName)) in the constructor:
 <code cpp-qt> <code cpp-qt>
 QString iconTheme = My::HeroicMeasures(); QString iconTheme = My::HeroicMeasures();
 QIcon::setThemeName(iconTheme);</code> QIcon::setThemeName(iconTheme);</code>
  
 +Until such ''HeroicMeasures()''™ are worked out or the bug is fixed, this method can't really be recommended.
 ===== Custom theme using  QIcon::fromTheme() ===== ===== Custom theme using  QIcon::fromTheme() =====
  
qt/icons.txt · Last modified: 2011/05/13 17:01 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki