Qt qdbus-can';t使用结构参数连接到dbus信号

Qt qdbus-can';t使用结构参数连接到dbus信号,qt,qdbus,Qt,Qdbus,我正在尝试连接到amarok d总线信号状态更改(参考:)。接口和结构正常,因为我可以连接到同一接口中的简单信号CapsChange(int),并且可以通过GetStatus dbus方法获取状态,所以这个marshall结构正常: struct AmarokStatus { int st1; int st2; int st3; int st4; }; Q_DECLARE_METATYPE(AmarokStatus) qDBusRegisterMetaType&

我正在尝试连接到amarok d总线信号状态更改(参考:)。接口和结构正常,因为我可以连接到同一接口中的简单信号CapsChange(int),并且可以通过GetStatus dbus方法获取状态,所以这个marshall结构正常:

struct AmarokStatus {
    int st1;
    int st2;
    int st3;
    int st4;
};

Q_DECLARE_METATYPE(AmarokStatus)
qDBusRegisterMetaType<AmarokStatus>();
我得到消息:

对象::连接:没有这样的信号 org::freedesktop::MediaPlayer::StatusChange(AmarokStatus)

我尝试过信号(StatusChange(struct))和信号(StatusChange(QDbusargument))以及其他类型,但消息相同

D-Foots说StatusChange的定义是:StatusChange(Struct of(Int32,Int32,Int32,Int32)),与dbus monitor相同。信号轨迹改变(结构数组)也有同样的问题。所以我肯定是把connect()方法搞砸了

mInf = new QDBusInterface("org.mpris.MediaPlayer2.amarok", "/Player",
                          "org.freedesktop.MediaPlayer", QDBusConnection::sessionBus(),this);
connect(mInf, SIGNAL(StatusChange(AmarokStatus)), this, SLOT(statusChanged(AmarokStatus)));
connect(mInf, SIGNAL(CapsChange(int)), this, SLOT(capsChange(int)));