17 lines
500 B
C++
17 lines
500 B
C++
|
#include <QVBoxLayout>
|
||
|
#include <QLabel>
|
||
|
#include <QPushButton>
|
||
|
#include "success_dialog.h"
|
||
|
|
||
|
namespace display {
|
||
|
|
||
|
SuccessDialog::SuccessDialog(std::string message, std::string action) {
|
||
|
setLayout(new QVBoxLayout());
|
||
|
layout()->addWidget(new QLabel(QString::fromStdString(message)));
|
||
|
|
||
|
auto button = new QPushButton(QString::fromStdString(action));
|
||
|
connect(button, &QPushButton::clicked, [this]() {accept();});
|
||
|
layout()->addWidget(button);
|
||
|
}
|
||
|
|
||
|
} // display
|