[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] KDE default application icon
From: Jim Bublitz <jbublitz () nwinternet ! com>
Date: 2006-09-25 5:04:20
Message-ID: 200609242204.21000.jbublitz () nwinternet ! com
[Download RAW message or body]
On Sunday 24 September 2006 03:15, Alek Wojdyga wrote:
> Hello everyone,
> how can I get the KDE default application icon?
> So far I've looked in .desktop file for Icon=.... line and searched for
> icon using findfile in some hardcoded dirs.
> Can this be achieved in a easier and more flexible (not hardcoded dirs)
> way?
I'm not sure what you're asking here. You can set the icon like this (assuming
'mainWindow' is the main window of your app, and a KMainWindow descendant):
icons = KIconLoader ()
mainWindow.setIcon (QPixmap (icons.loadIcon("stop", KIcon.Desktop)))
where "stop" is a icon's name ("stop" is the red circle with a white X in it).
Or (if your KApplication object is 'app'), you can get the QPixmap for the
icon by doing:
iconPixmap = app.icon ()
iconPixmap will be a QPixmap corresponding to the icon.
Is there something different you want to do?
Jim
_______________________________________________
PyKDE mailing list PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic