28 lines
396 B
C++
28 lines
396 B
C++
#ifndef MYWIDGET2_H
|
|
#define MYWIDGET2_H
|
|
|
|
#include <QWidget>
|
|
#include <QPushButton>
|
|
#include <QLineEdit> // 单行输入框
|
|
#include <QDebug>
|
|
|
|
class MyWidget2 : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit MyWidget2(QWidget *parent = nullptr);
|
|
|
|
public:
|
|
void getText(); // 自定义成员函数
|
|
|
|
private:
|
|
QPushButton *mBtn;
|
|
QLineEdit *mEdit;
|
|
|
|
signals:
|
|
|
|
|
|
};
|
|
|
|
#endif // MYWIDGET2_H
|