Hi,

before filing a bugreport against kdelibs, I'm wondering wether I may
be missing something on this. The following code compiles, but does
not generate a KPushButton with an icon, the icon is empty. Forcing
the KIcon overload to be taken fixes that, but that does not work with
designer-generated content. So Qt designer allows to select icons from
the theme, but the generated code will currently not set them
correctly on the button?

// This doesn't work
KPushButton btn;
btn.setIcon(QIcon::fromTheme(QString::fromUtf8("list-add")));
btn.show()
// This does work, but is not generated by designer obviously
KPushButton btn;
btn.setIcon(KIcon(QIcon::fromTheme(QString::fromUtf8("list-add"))));
btn.show()

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Reply via email to