KTextAddons

autocorrectiontreewidget.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 "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
Key_Delete
virtual bool event(QEvent *e) override
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.