This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
justhomework/SoftwareDesign/Code/2-1/mainwindow.cpp
2022-03-21 22:54:10 +08:00

24 lines
371 B
C++

#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_cal_clicked()
{
int a = ui->num1->value();
int b = ui->num2->value();
ui->answer->setText(QString::number(a+b));
}