KWidgetsAddons

klineediteventhandler.h
1/*
2 SPDX-FileCopyrightText: 2023 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#ifndef KLINEEDITEVENTHANDLER_H
7#define KLINEEDITEVENTHANDLER_H
8
9#include <kwidgetsaddons_export.h>
10
11class QObject;
12
13/**
14 * Event-handling utilities for QLineEdit instances.
15 *
16 * @since 6.0
17 */
19{
20/** Do not propagate Return or Enter key presses in line edits.
21 *
22 * QLineEdit::returnPressed() will still be emitted as normal, but the
23 * key event isn't propagated further up the widget hierarchy. This is
24 * useful to prevent closing a dialog for example.
25 */
26KWIDGETSADDONS_EXPORT void catchReturnKey(QObject *lineEdit);
27
28/**
29 * Handle drop events with URLs and replace the current line edit with the
30 * dropped URL.
31 */
32KWIDGETSADDONS_EXPORT void handleUrlDrops(QObject *lineEdit);
33};
34
35#endif
Event-handling utilities for QLineEdit instances.
void catchReturnKey(QObject *lineEdit)
Do not propagate Return or Enter key presses in line edits.
void handleUrlDrops(QObject *lineEdit)
Handle drop events with URLs and replace the current line edit with the dropped URL.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 1 2024 18:49:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.