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

25 lines
371 B
C++
Raw Normal View History

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