Bug 201793 - KPushButton icon property cannot be set in Qt Designer
Summary: KPushButton icon property cannot be set in Qt Designer
Status: RESOLVED UPSTREAM
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdeui (show other bugs)
Version: SVN
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Leupold
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 18:03 UTC by George Goldberg
Modified: 2010-01-31 23:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Goldberg 2009-07-28 18:03:44 UTC
Since we are encouraged to use Qt Designer and .ui files for as much UI stuff as possible when developing KDE applications, it would be helpful if KPushButton would allow its icon (using a freedesktop.org icon naming spec string) to be set in Qt Designer.
Comment 1 Michael Leupold 2009-07-28 18:13:26 UTC
Agreed :) I'll look into it.
Comment 2 Michael Leupold 2009-07-30 15:47:37 UTC
Quick update:
It would be possible to add an extra iconName property. Unfortunately that is pretty un-generic and all other widgets using KIcons would need a similar property as well (apart form that it already works well here :-)). I'm currently trying to figure out if Qt will provide an interface to add new property types for editing in designer.
Comment 3 George Goldberg 2009-07-30 16:08:58 UTC
I'm not sure if it's relevant, but I am able to set the icon on a KIconButton in designer (perhaps this could give a clue how to do it, or does it just use the extra iconName property?).
Comment 4 Michael Leupold 2009-07-30 16:22:06 UTC
Unfortunately it's the latter. KIconButton has a QString icon property which will set and load the icon on changing.

There's actually another drawback to the QString property: It seems the property is changed on every textChanged() signal, so whenever you type a key into the property editor the string gets updated and it will try to reload the icon (which sometimes adds a sloppy feel to it). Admittedly still better than the status quo.
Comment 5 Christoph Feck 2010-01-31 23:35:04 UTC
With the recent addition of QIcon::fromTheme() we may have luck that Qt Designer natively supports this.

http://bugreports.qt.nokia.com/browse/QTBUG-7777

I am closing this as upstream, as it does not make sense to have it only supported in KPushButton.