diff options
author | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-10 15:15:03 (GMT) |
---|---|---|
committer | Jens Bache-Wiig <jbache@trolltech.com> | 2009-08-10 15:39:20 (GMT) |
commit | 13a31fe82845f8b1f4d86919080d3b2a87c4d061 (patch) | |
tree | 6ec3b5c3bc0811abca5fc84d1aa094be30d4e8c4 /doc/src | |
parent | 35ef002453cbe9841e23a7d33064a51dbe99fb06 (diff) | |
download | Qt-13a31fe82845f8b1f4d86919080d3b2a87c4d061.zip Qt-13a31fe82845f8b1f4d86919080d3b2a87c4d061.tar.gz Qt-13a31fe82845f8b1f4d86919080d3b2a87c4d061.tar.bz2 |
Introducing icon theme support
Added some static functions to QIcon to support desktop
themes based on the freedesktop spec. It is not intended to
replace KIcon and the intention is to use it when available to
share icon cache between applications.
Applications currently using icon themes are Assistant, Designer
and the textedit demo.
Reviewed-by: ogoffart
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/snippets/code/src_gui_image_qicon.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/src/snippets/code/src_gui_image_qicon.cpp b/doc/src/snippets/code/src_gui_image_qicon.cpp index 2b7c893..455fd84 100644 --- a/doc/src/snippets/code/src_gui_image_qicon.cpp +++ b/doc/src/snippets/code/src_gui_image_qicon.cpp @@ -20,3 +20,12 @@ void MyWidget::drawIcon(QPainter *painter, QPoint pos) painter->drawPixmap(pos, pixmap); } //! [2] + +//! [3] + QIcon undoicon = QIcon::fromTheme("edit-undo"); +//! [3] + +//! [4] + QIcon undoicon = QIcon::fromTheme("edit-undo", QIcon(":/undo.png")); +//! [4] + |