Pages
API Documentation
On this page

KLineEditEventHandler Namespace

Event-handling utilities for QLineEdit instances. This namespace was introduced in Qt 6.0. More...

  • Header: #include <KLineEditEventHandler>
  • Since: Qt 6.0
  • CMake: find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
    target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)

Detailed Description

Function Documentation

void KLineEditEventHandler::catchReturnKey(QObject *lineEdit)

Do not propagate Return or Enter key presses in line edits.

QLineEdit::returnPressed() will still be emitted as normal, but the key event isn't propagated further up the widget hierarchy. This is useful to prevent closing a dialog for example.

void KLineEditEventHandler::handleUrlDrops(QObject *lineEdit)

Handle drop events with URLs and replace the current line edit with the dropped URL.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.