Commit 581cd035 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add QListView here too

parent e141ad3a
......@@ -20,6 +20,7 @@
#include "groupmanagementwidgettest.h"
#include "groupmanagementwidget.h"
#include <QListView>
#include <QTest>
#include <QVBoxLayout>
......@@ -36,4 +37,7 @@ void GroupManagementWidgetTest::shouldHaveDefaultValues()
auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout"));
QVERIFY(mainLayout);
QCOMPARE(mainLayout->contentsMargins(), {});
auto mListView = w.findChild<QListView *>(QStringLiteral("mListView"));
QVERIFY(mListView);
}
......@@ -20,16 +20,27 @@
#include "groupmanagementwidget.h"
#include <KLocalizedString>
#include <QListView>
#include <QVBoxLayout>
GroupManagementWidget::GroupManagementWidget(QWidget *parent)
: QWidget(parent)
, mListView(new QListView(this))
{
auto mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins({});
mainLayout->setObjectName(QStringLiteral("mainLayout"));
mListView->setObjectName(QStringLiteral("mListView"));
mainLayout->addWidget(mListView);
init();
}
GroupManagementWidget::~GroupManagementWidget()
{
}
void GroupManagementWidget::init()
{
//TODO
}
......@@ -24,12 +24,16 @@
#include <QWidget>
#include "libkdebugsettings_private_export.h"
class QListView;
class LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT GroupManagementWidget : public QWidget
{
Q_OBJECT
public:
explicit GroupManagementWidget(QWidget *parent = nullptr);
~GroupManagementWidget() override;
private:
void init();
QListView *const mListView;
};
#endif // GROUPMANAGEMENTWIDGET_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