Using QIcon in QML

Shaun Reich shaun.reich at kdemail.net
Sun Apr 24 03:32:52 CEST 2011


I'd like to use QIcon in qml code, I've looked into
kde-runtime/plasma/declarativeimports/QIconItem...
However, the property setIcon only allows a QIcon. which presents a
problem because I don't see a way of constructing a qicon from qml.

I've tried icon: QIcon("icon");, but that doesn't work, citing an
unknown variable; QIcon.

Am I doing something wrong? Or does the property need to be adjusted
to allow string representations and transform it into a qicon
automatically?

-- 
Shaun Reich,
KDE Software Developer (kde.org)


More information about the Plasma-devel mailing list