類中的任何信號派生自 QDBusAbstractAdaptor will be automatically relayed into D-Bus, provided that the signal's parameters conform to certain rules (see Qt D-Bus 類型係統 for more information). No special code is necessary to make this relay.
However, signals must still be emitted. The easiest way to emit an adaptor signal is to connect another signal to it, so that Qt's signals and slots mechanism automatically emits the adaptor signal, too. This can be done in the adaptor's constructor, as you can see in the D-Bus 復雜乒乓範例 .
The QDBusAbstractAdaptor::setAutoRelaySignals () convenience function can also be used to make and break connections between signals in the real object and the corresponding signals in the adaptor. It will inspect the list of signals in both classes and connect those whose parameters match exactly.
另請參閱 使用 Qt D-Bus 適配器 , 在 D-Bus 適配器中聲明槽 , Qt D-Bus 類型係統 ,和 QDBusAbstractAdaptor .