我在Ubuntu編程的C++,使用QDBus和我有下面的代碼片段:QDBus問題:越來越org.freedesktop.DBus.Error.UnknownMethod,但方法存在
this->m_cRemoteInterface = new QDBusInterface("org.my.service", "/data", "org.freedesktop.DBus.Properties.Get");
QDBusReply<uint64_t> cResult = m_cRemoteInterface->call("property1");
的代碼拋出以下錯誤:
org.freedesktop.DBus.Error.UnknownMethod: Method "property1" with signature "" on interface "org.freedesktop.DBus.Properties.Get" doesn't exist
但是,當我在shell發出以下命令,它返回正確的值:
dbus org.my.service /data org.freedesktop.DBus.Properties.Get " " property1
我能做什麼錯?
由於提前,EMI