-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
32 lines (29 loc) · 862 Bytes
/
Copy pathmainwindow.cpp
File metadata and controls
32 lines (29 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
qInfo() << "Constructed main window";
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
qInfo() << "Destructed main window";
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
qInfo() << "Clicked submit button";
if (ui->checkBox->isChecked()) {
ui->checkBox->setDisabled(true);
ui->lineEdit->setDisabled(true);
ui->lineEdit_2->setDisabled(true);
ui->lineEdit_3->setDisabled(true);
ui->lineEdit_4->setDisabled(true);
QMessageBox::information(this, "Informasjon", "Du trykket på knappen");
ui->pushButton->setVisible(false);
} else {
QMessageBox::critical(this, "Avbrutt", "Avmerkingsboksen ikke huket av");
}
}