[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Correct way of obtaining an icon
From: Stefan Majewsky <majewsky () gmx ! net>
Date: 2009-10-20 7:17:32
Message-ID: 200910200917.39294.majewsky () gmx ! net
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
Am Dienstag 20 Oktober 2009 06:57:13 schrieb Thomas Olsen:
> What is KDE wise the correct way of obtaining an icon?
>
> Take e.g. /usr/share/icons/oxygen/16x16/actions/arrow-up.png
>
> Get the arrow-up icon in small size from the current Theme based on KDE's
> location.
Construct an KIcon instance, and retrieve the pixmap with the QIcon::pixmap
member method. (If you were going to pass the pixmap to something that is
capable of taking a complete QIcon instance, you should rather do that,
because QIcon can contain multiple pixmaps with different sizes at once.)
Example:
> KIcon arrowIcon("arrow-up");
> const QPixmap arrowPixmap = arrowIcon.pixmap(QSize(16, 16), QIcon::Normal);
Greetings
Stefan
--
Die Zukunft wird nicht gemeistert von denen, die an der Vergangenheit kleben.
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic