D-Bus 어댑터에서 신호 선언하기
QDBusAbstractAdaptor 를 상속받은 클래스의 모든 신호는, 해당 신호의 매개변수가 특정 규칙을 준수하는 경우(자세한 내용은 ‘ Qt D-Bus 타입 시스템’ 참조) 자동으로 D-Bus로 전달됩니다. 이 전달을 위해 별도의 코드는 필요하지 않습니다.
그러나 신호는 여전히 발신되어야 합니다. 어댑터 신호를 발신하는 가장 쉬운 방법은 다른 신호를 해당 신호에 연결하여, Qt의 신호 및 슬롯 메커니즘이 어댑터 신호도 자동으로 발신하도록 하는 것입니다. 이는 Qt D-Bus Complex Ping Pong 예제에서 볼 수 있듯이 어댑터의 생성자에서 수행할 수 있습니다.
QDBusAbstractAdaptor::setAutoRelaySignals() 편의 함수를 사용하면 실제 객체의 신호와 어댑터의 해당 신호 간의 연결을 설정하거나 해제할 수도 있습니다. 이 함수는 두 클래스의 신호 목록을 검사하여 매개변수가 정확히 일치하는 신호들끼리 연결합니다.
Qt D-Bus 어댑터 사용, D-Bus 어댑터에서 슬롯 선언, Qt D-Bus 타입 시스템, QDBusAbstractAdaptor도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.