Qt D-Bus C++ Classes

The Qt D-Bus module is a Unix-only library that you can use to perform Inter-Process Communication using the D-Bus protocol. 更多...

Namespaces

QDBus

Contains miscellaneous identifiers used throughout the Qt D-Bus module

QDBusAbstractAdaptor

The base class of D-Bus adaptor classes

QDBusAbstractInterface

The base class for all D-Bus interfaces in the Qt D-Bus binding, allowing access to remote interfaces

QDBusArgument

Used to marshall and demarshall D-Bus arguments

QDBusConnection

Represents a connection to the D-Bus bus daemon

QDBusConnectionInterface

Access to the D-Bus bus daemon service

QDBusContext

Allows slots to determine the D-Bus context of the calls

QDBusError

Represents an error received from the D-Bus bus or from remote applications found in the bus

QDBusObjectPath

Enables the programmer to identify the OBJECT_PATH type provided by the D-Bus typesystem

QDBusSignature

Enables the programmer to identify the SIGNATURE type provided by the D-Bus typesystem

QDBusVariant

Enables the programmer to identify the variant type provided by the D-Bus typesystem

QDBusInterface

Proxy for interfaces on remote objects

QDBusMessage

Represents one message sent or received over the D-Bus bus

QDBusPendingCall

Refers to one pending asynchronous call

QDBusPendingCallWatcher

Convenient way for waiting for asynchronous replies

QDBusPendingReply

Contains the reply to an asynchronous method call

QDBusReply

Stores the reply for a method call to a remote object

QDBusServer

Peer-to-peer communication between processes on the same computer

QDBusServiceWatcher

Allows the user to watch for a bus service change

QDBusUnixFileDescriptor

Holds one Unix file descriptor

QDBusVirtualObject

Used to handle several DBus paths with one class

详细描述

使用Qt D-Bus模块的应用程序通过导出对象向其他远程应用程序提供服务, 也可以调用函数和访问属性, 使用这些应用程序导出的服务.

Qt D-Bus总线模块提供了一个扩展 Qt 信号和槽函数 机制的接口, 允许连接到远程发出的信号或将本地信号连接到远程槽函数.

要使用此模块, 在应用程序中使用以下代码:


  #include <QtDBus>

如果你使用qmake编译应用程序, 你可以在.pro文件加上以下代码, 链接Qt D-Bus库:


  QT += dbus

注意: Qt D-Bus模块的源码位于 src/qdbus目录. 若从源码编译, 此模块在编译Qt工具时编译.

如何使用此模块, 详见 D-Bus.