Hi Fernando, On Thursday, January 12, 2012 06:36:29 Lasath Fernando wrote: > 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?
We've put a few of those why-the-hack-didn't-qdeclarative-bind-those types into qtextracomponents, which is in kde-runtime. Try import org.kde.qtextracomponents 0.1 QIconItem { icon: QIcon("edit-paste") } Cheers, -- sebas http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel