[PyKDE] PyKDE application icon
Akos Polster
akos at pipacs.com
Mon Feb 28 19:11:53 GMT 2005
Hi,
as a newbie to PyKDE and KDE in general, I'm trying to set the icon for
an application with no luck (the default icon remains displayed). See
the code below. What's wrong with it?
Thanks
~ Akos.
...........
import sys
from kdecore import KApplication, KAboutData, KIcon, KIconLoader, \
KCmdLineArgs
from kdeui import KMainWindow, KMessageBox
class MainWin(KMainWindow):
def __init__ (self, *args):
apply(KMainWindow.__init__, (self,) + args)
self.setIcon(KIconLoader().loadIcon("kmail", KIcon.Desktop))
about = KAboutData ("icon", "icon", "1.0", "icon", \
KAboutData.License_GPL, "")
KCmdLineArgs.init(sys.argv, about)
app = KApplication()
mainWindow = MainWin(None, "main window")
mainWindow.show()
app.exec_loop()
--
Akos Polster
mailto:akos at pipacs.com
http://akos.pipacs.com
More information about the PyQt
mailing list