28 lines
504 B
C
28 lines
504 B
C
|
#ifndef WIDGET_H
|
||
|
#define WIDGET_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <iostream>
|
||
|
#include <QPushButton> // 按钮
|
||
|
#include <QLineEdit> // 文本输入框
|
||
|
#include <QLabel> // 文本标签
|
||
|
|
||
|
class Widget : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
Widget(QWidget *parent = nullptr);
|
||
|
~Widget();
|
||
|
|
||
|
public slots:
|
||
|
// 自定义槽函数, 需要在源文件中去实现函数功能
|
||
|
void sum();
|
||
|
|
||
|
private:
|
||
|
QLineEdit *le1,*le2;
|
||
|
QLabel *lable1,*lable2;
|
||
|
|
||
|
};
|
||
|
#endif // WIDGET_H
|