diff options
author | Rafał Babiarz <5783815+Sauler@users.noreply.github.com> | 2023-05-20 17:13:45 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-23 06:09:40 +0200 |
commit | 38a553e1cea5f19d1783f7c14249ee9731d21689 (patch) | |
tree | 29ef804c33c2fa212f549256b099f77c27ff29f1 /Ladybird | |
parent | 821f808e52e5a07494c854a8bfd908aca2918700 (diff) | |
download | serenity-38a553e1cea5f19d1783f7c14249ee9731d21689.zip |
Ladybird: Select all text in LocationEdit on click
Diffstat (limited to 'Ladybird')
-rw-r--r-- | Ladybird/LocationEdit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Ladybird/LocationEdit.cpp b/Ladybird/LocationEdit.cpp index e2368444c4..e9439c04c9 100644 --- a/Ladybird/LocationEdit.cpp +++ b/Ladybird/LocationEdit.cpp @@ -10,6 +10,7 @@ #include <QCoreApplication> #include <QPalette> #include <QTextLayout> +#include <QTimer> LocationEdit::LocationEdit(QWidget* parent) : QLineEdit(parent) @@ -27,6 +28,7 @@ void LocationEdit::focusInEvent(QFocusEvent* event) { QLineEdit::focusInEvent(event); highlight_location(); + QTimer::singleShot(0, this, &QLineEdit::selectAll); } void LocationEdit::focusOutEvent(QFocusEvent* event) |