[PyQt] Problems with KSysTray
Russell Valentine
russ at coldstonelabs.org
Sat May 17 01:28:53 BST 2008
By setting KAboutData and putting it in the KCmdLineArgs it puts
programName instead of unknown.
aboutData = KAboutData("appName", "My Super Cool Program Name", "0.01",
"This app does everything", KAboutData.License_GPL, "(c) 2008 John Doe",
None, "http://mywebpage.org", "john.doe at someemail.org");
app = KApplication ()
KCmdLineArgs.init(sys.argv, aboutData)
app = KApplication ()
...
Instead of unknown you'll see "My Super Cool Program Name"
David Klasinc wrote:
> Greetings,
>
> I hope that this list deals with PyKDE issues too. :) Anyways, I am
> making an application that stays docked in KDE Systray.
>
> Copied straight from the PyKDE examples, this is my code:
>
> self.systray = KSystemTray (self, "MyApp")
> self.systray.setCaption ("MyApp")
> self.systray.setPixmap (icons.loadIcon("stop", KIcon.Desktop))
> self.systray.connect (self.systray, SIGNAL ("quitSelected
> ()"), self.slotQuitSelected)
> self.systray.show ()
>
> I get the icon and the app runs fine also contextMenu is working.
> However, there is the first line of the context menu which says
> 'unknown'. How do I change this? It's been couple of years I was working
> with KDE or Qt and this is actually my first python application and I
> spent quite some time digging thru Qt and KDE API documentation and I
> couldn't find a way to change this.
>
> Calling self.systray.contextMenu().setTitle() or .addTitle() didn't
> really help since it created a new title in the menu.
>
> Where the hell did that 'unknown' came from? :)
>
> rgrds,
> David
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
More information about the PyQt
mailing list