Commit 0438ef48 authored by Laurent Montel's avatar Laurent Montel 😁

Add a qlistwidget

parent eb3ba8ff
......@@ -21,6 +21,7 @@
#include "../confirmaddresswidget.h"
#include <QTest>
#include <QVBoxLayout>
#include <QListWidget>
ConfirmAddressWidgetTest::ConfirmAddressWidgetTest(QObject *parent)
: QObject(parent)
......@@ -39,6 +40,9 @@ void ConfirmAddressWidgetTest::shouldHaveDefaultValue()
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->margin(), 0);
QListWidget *listEmails = w.findChild<QListWidget *>(QStringLiteral("listemails"));
QVERIFY(listEmails);
}
QTEST_MAIN(ConfirmAddressWidgetTest)
......@@ -20,6 +20,7 @@
#include "confirmaddresswidget.h"
#include <KLocalizedString>
#include <QListWidget>
#include <QVBoxLayout>
ConfirmAddressWidget::ConfirmAddressWidget(QWidget *parent)
......@@ -29,6 +30,9 @@ ConfirmAddressWidget::ConfirmAddressWidget(QWidget *parent)
mainLayout->setMargin(0);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
listEmails = new QListWidget(this);
listEmails->setObjectName(QStringLiteral("listemails"));
mainLayout->addWidget(listEmails);
}
ConfirmAddressWidget::~ConfirmAddressWidget()
......
......@@ -21,13 +21,15 @@
#define CONFIRMADDRESSWIDGET_H
#include <QWidget>
class QListWidget;
class ConfirmAddressWidget : public QWidget
{
Q_OBJECT
public:
explicit ConfirmAddressWidget(QWidget *parent = Q_NULLPTR);
~ConfirmAddressWidget();
private:
QListWidget *listEmails;
};
#endif // CONFIRMADDRESSWIDGET_H
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