报如下错误:
QObject::connect: signal not found in
1.信号的名字写错了
2.只在windows上出现,在Linux和mac不会出现。是因为在把工程编为dll时才会出现的问题。
注意:导出dll时需要
#ifdef LIBRARY
#define LIB_EXPORT Q_DECL_EXPORT
#else
#define LIB_EXPORT Q_DECL_IMPORT
#endif
class LIB_EXPORT Lib : public QObject {
Q_OBJECT
signals:
void testSignal();
}