#ifndef TEACHER_H #define TEACHER_H #include #include class Teacher : public QObject { Q_OBJECT public: explicit Teacher(QObject *parent = nullptr); public slots: void wake_up(); void wake_up(const QString &msg); // 信号带参数,处理的槽函数也要有参数,且类型保持一致 }; #endif // TEACHER_H