0
我可以在REPC生成的副本中使用QDomDocument信號/插槽嗎? 這是問題有關QtRO帶QDomDocument的QRemoteObject [QtRO]
我已經測試QtRemoteObject用簡單的例子,但只要我添加QDomDocument到.rep文件,我得到錯誤:
/Qt/5.7/android_armv7/include/QtCore/qmetatype.h: In instantiation of 'constexpr int qMetaTypeId() [with T = QDomDocument]':
/Qt/5.7/android_armv7/include/QtCore/qmetatype.h:1752:27: required from 'constexpr int qRegisterMetaType() [with T = QDomDocument]'
rep_pingpong_replica.h:32:41: required from here
/Qt/5.7/android_armv7/include/QtCore/qglobal.h:746:47: error: static assertion failed: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system
.rep文件
#include <QDomDocument>
class PingPong {
SLOT(void ping(QString msg));
SLOT(void pingXml(QDomDocument xml));
SIGNAL(pong(QString msg));
}
。代表文件不會允許Q_DECLARE_METATYPE 在我的應用程序中,我只是使用 qRegisterMetaType(「QDomDocument」); 信號/插槽,但我不知道如何用QtRemoteObject做到這一點?
問候
馬立克