On Wednesday 22 August 2012 00:54:12 Andreas Pakulat wrote:
> // This doesn't work
> KPushButton btn;
> btn.setIcon(QIcon::fromTheme(QString::fromUtf8("list-add")));
>
> // This does work, but is not generated by designer obviously
> KPushButton btn;
> btn.setIcon(KIcon(QIcon::fromTheme(QString::fromUtf8("list-add"))))
To me, it looks like a bug in kdelibs. The method accepting the QIcon
should probably call the other method, instead of only setting the
icon internally in the KGuiItem:
void KPushButton::setIcon( const QIcon &qicon )
{
- d->item.setIcon(KIcon(qicon));
+ setIcon(KIcon(qicon));
}
Christoph Feck (kdepepo)
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<