[PyKDE] KSystemTray, SetToolTip and python

David Boddie david at boddie.org.uk
Tue May 18 13:13:01 BST 2004


On Tue, 18 May 2004 11:41:05, Rafal Zawadzki <bluszcz at jabberpl.org> wrote:

> I am writing small application and I want use KSystemTray. Is there any
> documentation with *examples* telling more about programming in PyKDE?

The place to start looking is the PyQtWiki:

http://www.diotavelli.net/PyQtWiki/DocsAndHowtos

Hopefully, more tutorials will get written now that there's a central resource
for PyQt/PyKDE.

> For example i want to make tooltip for my icon in systray. I've already
> read documentation at
> http://www.riverbankcomputing.co.uk/pykde/docs/index.html, especially
> Class reference here:
> http://www.riverbankcomputing.co.uk/pykde/docs/classref/index.html, but
> I've never programmend anything in Qt/KDE (only Gtk / wxWindows).
>
> Any hints, links will be helpful, thanks of lot.

If you've created a KSystemTray instance, by doing something like

  systray = KSystemTray(None)

then you can give it a tooltip using QToolTip:

  QToolTip.add(systray, "Some text")

Note the use of a static function to do this (you don't need to create a
QToolTip object).

If you're using KDE, you'll need to enable tooltips for the panel if
you want to see your new tooltip. Click the right mouse button over the
panel, select "Configure Panel", choose the "Appearance" section of the
dialog window then enable tooltips.

Good luck!

David




More information about the PyQt mailing list