被发送自定义对象:
spotMethod 由emit 发送 需要注册该自定义类
spotMethod() {
//qRegistermetaType("spotMethod");
}
spotMethod(const spotMethod& sp) {// 否则使用qRegistermetaType会报错
//qRegistermetaType("spotMethod");
}
在主线程的构造函数使用qRegistermetaType 记得添加头文件
#include

被发送自定义对象:
spotMethod 由emit 发送 需要注册该自定义类
spotMethod() {
//qRegistermetaType("spotMethod");
}
spotMethod(const spotMethod& sp) {// 否则使用qRegistermetaType会报错
//qRegistermetaType("spotMethod");
}
在主线程的构造函数使用qRegistermetaType 记得添加头文件
#include