#ifndef WIDGET5_H #define WIDGET5_H #include #include #include #include "widget6.h" class Widget5 : public QWidget { Q_OBJECT public: explicit Widget5(QWidget *parent = nullptr); ~Widget5(){ delete w6;} private: Widget6 *w6; // Widget6 类对象的指针成员 QPushButton *btn; signals: }; #endif // WIDGET5_H