Qt for Python DBusIntegration
Jump to navigation
Jump to search
PySide D-Bus Integration
To get PySide and DBus working toghether you can use the glib mainloop integration already done in pydbus.
The examples below show how to export Qt objects to Python and emit a D-Bus signal when a Qt signal is emitted. The code comments explain what you need to know about PySide and D-Bus.
Also refer to the dbus-python tutorial [dbus.freedesktop.org].
D-Bus Client
D-Bus Server
Running the examples
Copy the client code to a file called example-client.py and the server to a file called example-server.py and type:
A small window should appear on screen. Click on the button to emit a Qt signal. The signal will be converted to a D-Bus signal that will be caught by our D-Bus client.