qt_add_dbus_interfaces
D-Bus 인터페이스 설명 파일용 인터페이스를 구현하는 C++ 소스 코드를 생성합니다.
이 명령은 Qt6 패키지의 DBus 컴포넌트에 정의되어 있습니다. 다음 명령을 사용하여 패키지를 불러오십시오:
find_package(Qt6 REQUIRED COMPONENTS DBus)이 명령어는 Qt 6.0에서 도입되었습니다.
구문
qt_add_dbus_interfaces(<VAR> dbus_spec1 [dbus_spec2 ...])버전 정보가 없는 명령어가 비활성화된 경우, 대신 qt6_add_dbus_interfaces() 을 사용하십시오. 이 명령어와 동일한 인자 집합을 지원합니다.
설명
dbus_spec1, dbus_spec2 에 정의된 D-Bus 인터페이스를 구현하는 C++ 소스 코드를 생성합니다. 여기서 각 인수는 유효한 D-Bus 인터페이스 설명 파일의 경로여야 합니다. 생성된 파일의 경로는 <VAR> 에 추가됩니다.
각 인자에 대해, Qt D-Bus 의 XML 컴파일러(qdbusxml2cpp) 를 인터페이스(프록시) 모드로 호출하도록 설정됩니다.
생성된 C++ 소스 파일의 이름은 XML 파일의 이름을 따릅니다. 예를 들어, org.example.chat.xml 파일의 경우 생성된 헤더 파일의 이름은 orgexamplechatinterface.h 이 됩니다.
옵션
각 파일 인수에 대해 set_source_files_properties 을 사용하여 옵션을 설정할 수 있습니다:
| 옵션 | 값 | 설명 |
|---|---|---|
CLASSNAME | class_name | class_name 를 사용하여 기본 인터페이스 클래스 이름을 재정의합니다. |
NO_NAMESPACE | 부울 | ON 로 설정된 경우 네임스페이스 이름을 생성하지 않습니다. |
INCLUDE | path | 생성된 코드에 ` #include "path" `를 추가합니다. |
© 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.