如何使用QtDbus注册接口和注册方法

How to register an interface and register methods using QtDbus?

本文关键字:注册 方法 接口 QtDbus 何使用      更新时间:2023-10-16

我想在QtDbus上注册一个接口和方法。

在glib-Dbus中,我们有一个方法g_Dbus_register_interface(..,..,..)

有没有一种方法可以让我使用QtDbus做同样的事情?

是的,您必须使用QDBusConnectionInterface::registerService和QDBusConnectionInterface::registerObject。请按照本手册获取完整指南:http://techbase.kde.org/Development/Tutorials/D-Bus/Creating_Interfaces.