Answer the question
In order to leave comments, you need to log in
How to get rid of undefined reference to error?
Good afternoon! I have this problem:
In the first project I used signals and slots:
.h file:
// Код...
Q_OBJECT
signals:
signal1();
signal2();
// Код...
class Parent
{
signals:
signal1();
signal2();
protected:
// Методы, в которых я вызываю сигналы
class Child : public Parent
{
Q_OBJECT
// Код...
}
Answer the question
In order to leave comments, you need to log in
In order for the signal slots to work, it is just necessary that the class be a descendant of QObject or a descendant of any successor of QObject. You also need the Q_OBJECT macro where signals or slots sections are used. You also missed the type in the signal names.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question