【发布时间】:2011-03-28 06:16:11
【问题描述】:
我在 Ubuntu 上使用 QDBus 编写 C++,我有以下代码 sn-p:
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: 方法“property1” 界面上的签名“” “org.freedesktop.DBus.Properties.Get” 不存在
但是当我在 shell 中发出以下命令时,它会返回正确的值:
dbus org.my.service /data org.freedesktop.DBus.Properties.Get " " 属性1
我会做错什么?
提前致谢,emi
【问题讨论】: