File indexing completed on 2024-05-12 16:02:29
0001 /* 0002 * SPDX-FileCopyrightText: 2021 Alvin Wong <alvin@alvinhc.com> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #include <KisPopupSelfActivatingLineEdit.h> 0008 0009 0010 KisPopupSelfActivatingLineEdit::KisPopupSelfActivatingLineEdit(QWidget *parent) 0011 : QLineEdit(parent) 0012 { 0013 } 0014 0015 KisPopupSelfActivatingLineEdit::~KisPopupSelfActivatingLineEdit() 0016 { 0017 } 0018 0019 0020 void KisPopupSelfActivatingLineEdit::focusInEvent(QFocusEvent *e) 0021 { 0022 QWidget *w = window(); 0023 if (w->windowType() == Qt::Popup) { 0024 w->activateWindow(); 0025 } 0026 QLineEdit::focusInEvent(e); 0027 }