KTextAddons

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

KDE's Doxygen guidelines are available online.