引用第6楼dbzhang800于2010-05-21 17:17发表的 :
1. 贴你头文件 signals 部分
2. 贴你的包含connect语句的部分
3. 贴你的出错信息
.......
头文件部分
signals:
void msgBoxsignal_0();
void msgBoxsignal_1();
void msgBoxsignal_2();
void msgBoxsignal_3();
void msgBoxsignal_4();
void msgBoxsignal_5();
void msgBoxsignal_6();
void msgBoxsignal_7();
void msgBoxsignal_8();
void msgBoxsignal_9();
void msgBoxsignal_10();
void msgBoxsignal_11();
void msgBoxsignal_12();
void msgBoxsignal_13();
connect 在主线程中
b = new SerialThread(this);
connect(b, SIGNAL(msgBoxsignal_0()), this, SLOT(msgBoxslot_0()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_1()), this, SLOT(msgBoxslot_1()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_2()), this, SLOT(msgBoxslot_2()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_3()), this, SLOT(msgBoxslot_3()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_4()), this, SLOT(msgBoxslot_4()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_5()), this, SLOT(msgBoxslot_5()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_6()), this, SLOT(msgBoxslot_6()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_7()), this, SLOT(msgBoxslot_7()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_8()), this, SLOT(msgBoxslot_8()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_9()), this, SLOT(msgBoxslot_9()), Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_10()), this, SLOT(msgBoxslot_10()),Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_11()), this, SLOT(msgBoxslot_11()),Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_12()), this, SLOT(msgBoxslot_12()),Qt::QueuedConnection);
connect(b, SIGNAL(msgBoxsignal_13()), this, SLOT(msgBoxslot_13()),Qt::QueuedConnection);
编译正常,运行时候提示如下
Object::connect: No such signal QThread::msgBoxsignal_0()
Object::connect: No such signal QThread::msgBoxsignal_1()
Object::connect: No such signal QThread::msgBoxsignal_2()
Object::connect: No such signal QThread::msgBoxsignal_3()
Object::connect: No such signal QThread::msgBoxsignal_4()
Object::connect: No such signal QThread::msgBoxsignal_5()
Object::connect: No such signal QThread::msgBoxsignal_6()
Object::connect: No such signal QThread::msgBoxsignal_7()
Object::connect: No such signal QThread::msgBoxsignal_8()
Object::connect: No such signal QThread::msgBoxsignal_9()
Object::connect: No such signal QThread::msgBoxsignal_10()
Object::connect: No such signal QThread::msgBoxsignal_11()
Object::connect: No such signal QThread::msgBoxsignal_12()
Object::connect: No such signal QThread::msgBoxsignal_13()
[ 此帖被butcherty在2010-05-24 08:40重新编辑 ]