Dec-11-2023, 08:14 PM
Hello,
can you help me with the correct syntax to connect to a DBus signal?
This is one of my many tries which at least runs and matches the signature in the docs:
On the output I see:
qt.dbus.integration: Could not connect "org.freedesktop.DBus" to ochangeslot
Thank you in advance for any help!
can you help me with the correct syntax to connect to a DBus signal?
This is one of my many tries which at least runs and matches the signature in the docs:
class MainWindow(QMainWindow):
__slots__ = ["__mainwidget"]
__mainwidget:QWidget
def __init__ (self, *args, **kwargs):
super().__init__(*args, **kwargs)
service = 'org.freedesktop.DBus'
path = '/org/freedesktop/DBus'
iface = 'org.freedesktop.DBus'
conn = QtDBus.QDBusConnection.systemBus()
conn.connect(service, path, iface, "NameOwnerChanged", self, "nochangeslot")
#smp = QtDBus.QDBusInterface(service, path, iface, connection=QtDBus.QDBusConnection.systemBus()
def nochangeslot(self, arg:object) -> None:
print(arg)
passBut it doesn't work and looks weird with the slot as string...On the output I see:
qt.dbus.integration: Could not connect "org.freedesktop.DBus" to ochangeslot
Thank you in advance for any help!
