[PyQt] desktop workspace

Baz Walter bazwal at ftml.net
Sat Aug 6 17:34:17 BST 2011


On 06/08/11 00:35, emmanuel_mayssat at lynceantech.com wrote:
> I am trying to save the geometry and and the workspace where the application has been closed.
> Is there a way with Python/Qt to get the info on the workspace number!?

you could use dbus:

 >>> import dbus
 >>> bus = dbus.SessionBus()
 >>> kwin = bus.get_object('org.kde.kwin', '/KWin')
 >>> print kwin.currentDesktop()
3


More information about the PyQt mailing list