QDBusConnection::systemBus().connect(QString("org.freedesktop.Hal"), QString("/org/freedesktop/Hal/devices/platform_slide"), QString("org.freedesktop.Hal.Device"), QString("PropertyModified"), this, SLOT(slotKeyboardSlide()));
QDBusInterface propertyInterface("org.freedesktop.Hal", QString("/org/freedesktop/Hal/devices/platform_slide"), "org.freedesktop.Hal.Device", QDBusConnection::systemBus()); bool pressed = propertyInterface.call("GetProperty", "button.state.value").arguments().at(0).toBool();
QT += dbus
You'll also need the following line in the .pro file: