Commit 5ef40a09 authored by Laurent Montel's avatar Laurent Montel 😁

Add buttonbox

parent 8d5e5734
......@@ -19,6 +19,7 @@
#include "../printconfiguredialog.h"
#include "../printconfigurewidget.h"
#include <QTest>
#include <QDialogButtonBox>
PrintConfigureDialogTest::PrintConfigureDialogTest(QObject *parent)
: QObject(parent)
......@@ -36,6 +37,9 @@ void PrintConfigureDialogTest::shouldHaveDefaultValue()
WebEngineViewer::PrintConfigureDialog dlg;
WebEngineViewer::PrintConfigureWidget *w = dlg.findChild<WebEngineViewer::PrintConfigureWidget *>(QStringLiteral("configurewidget"));
QVERIFY(w);
QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox"));
QVERIFY(buttonBox);
}
QTEST_MAIN(PrintConfigureDialogTest)
......@@ -32,6 +32,11 @@ PrintConfigureDialog::PrintConfigureDialog(QWidget *parent)
mConfigureWidget = new PrintConfigureWidget(this);
mConfigureWidget->setObjectName(QStringLiteral("configurewidget"));
mainLayout->addWidget(mConfigureWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
buttonBox->setObjectName(QStringLiteral("buttonBox"));
mainLayout->addWidget(buttonBox);
}
PrintConfigureDialog::~PrintConfigureDialog()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment