Qt 是否公开了一种方法来监视 DBus 接口,类似于g_bus_watch_name
?我想知道应用程序何时启动或关闭,观察它的 DBus 接口。
问问题
446 次
1 回答
0
There is the QDBusServiceWatcher
class that can monitor the bus for service changes. From the docs-
The QDBusServiceWatcher class allows the user to watch for a bus service change.
A QDBusServiceWatcher object can be used to notify the application about an ownership change of a service name on the bus. It has three watch modes:
- Watching for service registration only.
- Watching for service unregistration only.
- Watching for any kind of service ownership change (the default mode).
于 2014-05-30T13:55:46.247 回答