I am working with Qt 5.8 and VS Community 2015. When I define two or more signals in a class, for all signals except for the first one, VS will show a "function definition not found" warning. Also, I have started to run into weird linker/other issues after I started having multiple signals defined in my classes, which I think might be related. I would appreciate any information regarding this.
Update: When I delete the moc file, qmake won't re-moc it and will give linker errors. Update: The moc file looks normal. It has both signals implemented yet I'm still having this odd behavior.
class MyClass: public QObject{
public:
MyClass() {}
private:
Q_OBJECT
signals:
void signal1(); // no warning
void signal2(); // intellisense warns for no function definition
};
However, if I add signals: before every signal I define, I won't get such behavior.
class MyClass: public QObject{
public:
MyClass() {}
private:
Q_OBJECT
signals:
void signal1(); // no warning
signals:
void signal2(); // no warning
};