//正确
class Second : public QObject { Q_OBJECT public: Second(); explicit Second(QObject *parent,int num); bool testFucntion(void); signals: public slots:
//错误,原因-声明中,参数都是带默认值的,那样编译器无法和默认构造函数区分开 class Second : public QObject { Q_OBJECT public: Second(); explicit Second(QObject *parent=0,int num); bool testFucntion(void); signals: public slots:
//正确 class Second : public QObject { Q_OBJECT public: Second(); explicit Second(QObject *parent,int num=0); bool testFucntion(void); signals: public slots:
参看链接:
http://bbs.csdn.net/topics/360187259