如下截图所示,增加三行代码即可:
#include<QMetaType> Q_DECLARE_METATYPE(QVector<int>); qRegisterMetaType<QVector<int>>("QVector<int>&");