Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ee4c8226 authored by Laurent Montel's avatar Laurent Montel 😁

Add delete shortcut for removing recent address

parent 30e131c9
......@@ -31,6 +31,7 @@
#include <QListWidget>
#include <QKeyEvent>
#include <QToolButton>
#include <QShortcut>
using namespace KPIM;
RecentAddressWidget::RecentAddressWidget(QWidget *parent)
......@@ -68,6 +69,10 @@ RecentAddressWidget::RecentAddressWidget(QWidget *parent)
lineLayout->addWidget(mRemoveButton);
connect(mRemoveButton, &QPushButton::clicked, this, &RecentAddressWidget::slotRemoveItem);
QShortcut *shortcut = new QShortcut(this);
shortcut->setKey(QKeySequence(Qt::Key_Delete));
connect(shortcut, &QShortcut::activated, this, &RecentAddressWidget::slotRemoveItem);
mListView = new QListWidget(this);
mListView->setObjectName(QStringLiteral("list_view"));
mListView->setSelectionMode(QAbstractItemView::ExtendedSelection);
......
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