-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththirdwindow.cpp
More file actions
37 lines (30 loc) · 950 Bytes
/
Copy paththirdwindow.cpp
File metadata and controls
37 lines (30 loc) · 950 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
33
34
35
36
37
#include "thirdwindow.h"
#include "ui_thirdwindow.h"
#include <QMessageBox>
ThirdWindow::ThirdWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::ThirdWindow)
{
ui->setupUi(this);
setWindowTitle("Student Information");
// Connect the submit button click signal to the slot
connect(ui->submitButton, &QPushButton::clicked, this, &ThirdWindow::on_submitButton_clicked);
// Connect the cancel button click signal to the slot
connect(ui->cancelButton, &QPushButton::clicked, this, &ThirdWindow::on_cancelButton_clicked);
}
ThirdWindow::~ThirdWindow()
{
delete ui;
}
void ThirdWindow::on_submitButton_clicked()
{
// Show confirmation message box
QMessageBox::information(this, "Confirmation", "Student information submitted successfully.");
// Close the entire application
QApplication::quit();
}
void ThirdWindow::on_cancelButton_clicked()
{
// Close the third window
this->close();
}