File indexing completed on 2024-12-22 04:28:09
0001 /* 0002 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "autocorrectiontreewidget.h" 0008 0009 #include <QKeyEvent> 0010 0011 using namespace TextAutoCorrectionWidgets; 0012 0013 AutoCorrectionTreeWidget::AutoCorrectionTreeWidget(QWidget *parent) 0014 : QTreeWidget(parent) 0015 { 0016 } 0017 0018 AutoCorrectionTreeWidget::~AutoCorrectionTreeWidget() = default; 0019 0020 void AutoCorrectionTreeWidget::keyPressEvent(QKeyEvent *event) 0021 { 0022 if (event->key() == Qt::Key_Delete) { 0023 Q_EMIT deleteSelectedItems(); 0024 } 0025 QTreeWidget::keyPressEvent(event); 0026 } 0027 0028 #include "moc_autocorrectiontreewidget.cpp"