Commit a9a369ea authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more treewidget settings

parent e9745bac
Pipeline #93582 passed with stage
in 50 minutes and 48 seconds
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include "scamconfiguresettingswidgettest.h" #include "scamconfiguresettingswidgettest.h"
#include "../scamconfiguresettingswidget.h" #include "../scamconfiguresettingswidget.h"
#include <QHeaderView>
#include <QTest> #include <QTest>
#include <QTreeWidget> #include <QTreeWidget>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -23,4 +24,6 @@ void ScamConfigureSettingsWidgetTest::shouldHaveDefaultValues() ...@@ -23,4 +24,6 @@ void ScamConfigureSettingsWidgetTest::shouldHaveDefaultValues()
auto mTreeWidget = w.findChild<QTreeWidget *>(QStringLiteral("mTreeWidget")); auto mTreeWidget = w.findChild<QTreeWidget *>(QStringLiteral("mTreeWidget"));
QVERIFY(mTreeWidget); QVERIFY(mTreeWidget);
QVERIFY(!mTreeWidget->rootIsDecorated());
QVERIFY(!mTreeWidget->header()->sectionsMovable());
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <KConfigGroup> #include <KConfigGroup>
#include <KLocalizedString> #include <KLocalizedString>
#include <KSharedConfig> #include <KSharedConfig>
#include <QHeaderView>
#include <QTreeWidget> #include <QTreeWidget>
#include <QVBoxLayout> #include <QVBoxLayout>
...@@ -21,6 +22,8 @@ ScamConfigureSettingsWidget::ScamConfigureSettingsWidget(QWidget *parent) ...@@ -21,6 +22,8 @@ ScamConfigureSettingsWidget::ScamConfigureSettingsWidget(QWidget *parent)
mTreeWidget->setObjectName(QStringLiteral("mTreeWidget")); mTreeWidget->setObjectName(QStringLiteral("mTreeWidget"));
mainLayout->addWidget(mTreeWidget); mainLayout->addWidget(mTreeWidget);
mTreeWidget->setRootIsDecorated(false);
mTreeWidget->header()->setSectionsMovable(false);
} }
ScamConfigureSettingsWidget::~ScamConfigureSettingsWidget() ScamConfigureSettingsWidget::~ScamConfigureSettingsWidget()
......
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