[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Loading icon from another application
From: Jonathan Riddell <jr () jriddell ! org>
Date: 2004-03-01 19:35:56
Message-ID: 20040301193556.GV24407 () muse ! 19inch ! net
[Download RAW message or body]
On Mon, Mar 01, 2004 at 06:00:27PM +0000, Jonathan Riddell wrote:
>
> Is it possible to load an icon from another application? I'm trying
> to load Gwenview icons from the Gwenview KParts.
>
> This doesn't seem to be working:
>
> KIconLoader iconLoader = KIconLoader("gwenview");
> QIconSet iconset = iconLoader.loadIconSet("gvnext",
> KIcon::Toolbar);
> mSelectPrevious=new KAction(i18n("&Previous"),
> iconset, Key_BackSpace,
> this,SLOT(slotSelectPrevious()),
> actionCollection, "previous");
Very strange but it seems to work if I 'preload' them with KIconLoader
KIconLoader iconLoader = KIconLoader("gwenview");
iconLoader.loadIconSet("gvnext", KIcon::Toolbar);
iconLoader.loadIconSet("gvprevious", KIcon::Toolbar);
mSelectPrevious=new KAction(i18n("&Previous"),
QApplication::reverseLayout() ?
"gvnext":"gvprevious", Key_BackSpace,
this,SLOT(slotSelectPrevious()), actionCollection, "previous");
The KAction has the correct icon now, it doesn't if I don't create the
KIconLoader. Strange.
Jonathan Riddell
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic