KTextAddons

autocorrectionlistwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "autocorrectionlistwidget.h"
8
9#include <QKeyEvent>
10
11using namespace TextAutoCorrectionWidgets;
12
13AutoCorrectionListWidget::AutoCorrectionListWidget(QWidget *parent)
14 : QListWidget(parent)
15{
16}
17
18AutoCorrectionListWidget::~AutoCorrectionListWidget() = default;
19
20void AutoCorrectionListWidget::keyPressEvent(QKeyEvent *event)
21{
22 if (event->key() == Qt::Key_Delete) {
23 Q_EMIT deleteSelectedItems();
24 }
26}
27
28#include "moc_autocorrectionlistwidget.cpp"
virtual void keyPressEvent(QKeyEvent *event) override
virtual bool event(QEvent *e) override
Q_EMITQ_EMIT
Key_Delete
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.