The DBus Support Module — PyQt 4.8.4 Reference Guide

### Navigation

- index
- modules |
- next |
- previous |
- PyQt 4.8.4 Reference Guide »

# The DBus Support Module

The DBus support module is installed as `dbus.mainloop.qt` and provides support for the Qt event loop to the standard `dbus-python` language bindings package. The module’s API is almost identical to that of the `dbus.mainloop.glib` modules that provides support for the GLib event loop.

The `dbus.mainloop.qt` module contains the following function.

`DBusQtMainLoop`(set_as_default=False)

  Create a `dbus.mainloop.NativeMainLoop` object that uses the the Qt event loop.

  Parameters: | set_as_default – is optionally set to make the main loop instance the default for all new Connection and Bus instances. It may only be specified as a keyword argument, and not as a positional argument.

The following code fragment is all that is normally needed to set up the standard `dbus-python` language bindings package to be used with PyQt:

    from dbus.mainloop.qt import DBusQtMainLoop

    DBusQtMainLoop(set_as_default=True)

### Navigation

- index
- modules |
- next |
- previous |
- PyQt 4.8.4 Reference Guide »