[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KAction - setting an iconSet fails
From:       David Faure <faure () kde ! org>
Date:       2005-03-31 10:13:32
Message-ID: 200503311213.32918.faure () kde ! org
[Download RAW message or body]

On Thursday 31 March 2005 02:19, David Boosalis wrote:
> I have an embeded image (using qembed) that I want to use in a toolbar 
> with KAction
> The icon will not display for a KAction, but will display if I use 
> QAction.  KAction will also display if it is read from a file with the 
> KDE API:
>  
>  exitIcon = new QIconSet();
> KIconLoader *iconLoader = KGlobal::iconLoader();
>   if (iconLoader != 0) {
>   *exitIcon = iconLoader->loadIcon("exit",KIcon::Toolbar,
>                                                                          
>    KIcon::SizeMedium);
> 
> 
> /* this is the code that will not display the icon */
>  exitA = new KAction(tr("Exit"),
>                                           QKeySequence("CTRL + Key_D"),
>                                            this,
>                                           "exitAction");

This is quite a complicated way... why not just pass "exit" as the icon name, in the KAction constructor?

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
 
>> 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