Does Qt expose a method to watch a DBus interface, similar with g_bus_watch_name
? I want to know when an application is started or closed, watching its DBus interface.
Asked
Active
Viewed 496 times
1 Answers
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).

Linville
- 3,613
- 1
- 27
- 41