Commit 88748aa8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to sort items

parent 5e5926b0
Pipeline #110434 failed with stage
in 15 minutes and 18 seconds
......@@ -9,6 +9,7 @@
#include "confirmbeforedeletingmanager.h"
#include <KLocalizedString>
#include <KMessageBox>
#include <QHeaderView>
#include <QIcon>
#include <QMenu>
#include <QPointer>
......@@ -28,6 +29,8 @@ ConfirmBeforeDeletingWidget::ConfirmBeforeDeletingWidget(QWidget *parent)
mTreeWidget->setRootIsDecorated(false);
mTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
mTreeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
mTreeWidget->header()->setSortIndicatorShown(true);
mTreeWidget->setSortingEnabled(true);
const QStringList lst = {i18n("Type"), i18n("Pattern")};
mTreeWidget->setHeaderLabels(lst);
connect(mTreeWidget, &QTreeWidget::customContextMenuRequested, this, &ConfirmBeforeDeletingWidget::slotCustomContextMenuRequested);
......
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