Plasma Components Question
Marco Martin
notmart at gmail.com
Thu Jan 12 10:03:50 UTC 2012
On Thursday 12 January 2012, Lasath Fernando wrote:
> Hey,
>
> I've been using Plasma Components 4.8 for a new plasmoid in
> telepathy-kde, and I have a question regarding the Button (or
> ToolButton) component.
> From what I've seen so far, it only has a property to set the source
> for the icon.
> I need a way to set the icon directly as a (Q|K)Icon, as the only way
> to get the icon for a user's current presence is through the
> KTp::Presence::icon() method, which returns a KIcon.
> So far, I've been using a workaround to get icon sources that causes a
> lot of ugly and duplicate code in our libraries, and have been told to
> find a way to avoid.
>
> So, is there something I'm missing?
provided that kdeclarative is used (and being a plasmoid it is) just assigning
the iconsource to the qicon should work, i did some hacks to make it work
(that's why the source is a qvariant and not a string)
--
Marco Martin
More information about the Plasma-devel
mailing list