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

Add popup menu

parent f145ea47
Pipeline #68581 passed with stage
in 54 minutes and 20 seconds
......@@ -6,6 +6,7 @@
#include "confirmbeforedeletingwidget.h"
#include "confirmbeforedeletingcreateruledialog.h"
#include <KLocalizedString>
#include <QTreeWidget>
#include <QVBoxLayout>
......@@ -18,8 +19,18 @@ ConfirmBeforeDeletingWidget::ConfirmBeforeDeletingWidget(QWidget *parent)
mainLayout->setObjectName(QStringLiteral("mainlayout"));
// TODO
mainLayout->addWidget(mTreeWidget);
mTreeWidget->setAlternatingRowColors(true);
mTreeWidget->setRootIsDecorated(false);
mTreeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
const QStringList lst = {i18n("Name"), i18n("Type")};
mTreeWidget->setHeaderLabels(lst);
connect(mTreeWidget, &QTreeWidget::customContextMenuRequested, this, &ConfirmBeforeDeletingWidget::slotCustomContextMenuRequested);
}
ConfirmBeforeDeletingWidget::~ConfirmBeforeDeletingWidget()
{
}
void ConfirmBeforeDeletingWidget::slotCustomContextMenuRequested(const QPoint &p)
{
}
......@@ -17,5 +17,6 @@ public:
~ConfirmBeforeDeletingWidget() override;
private:
void slotCustomContextMenuRequested(const QPoint &p);
QTreeWidget *const mTreeWidget;
};
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