From aac9eb0d379a5e8b3bb94fa645b6e2cf7372d0fb Mon Sep 17 00:00:00 2001 From: Ladislav Foldyna Date: Thu, 3 Aug 2023 13:39:57 +0200 Subject: [PATCH] Fixed #233 - New QSO - Text field alignment --- ui/EditLine.cpp | 6 ++++++ ui/EditLine.h | 1 + 2 files changed, 7 insertions(+) diff --git a/ui/EditLine.cpp b/ui/EditLine.cpp index d8669e08..03169cae 100644 --- a/ui/EditLine.cpp +++ b/ui/EditLine.cpp @@ -31,3 +31,9 @@ void NewContactEditLine::focusOutEvent(QFocusEvent *event) home(false); } } + +void NewContactEditLine::setText(const QString &text) +{ + QLineEdit::setText(text); + home(false); +} diff --git a/ui/EditLine.h b/ui/EditLine.h index ce0b132e..f7847560 100644 --- a/ui/EditLine.h +++ b/ui/EditLine.h @@ -10,6 +10,7 @@ class NewContactEditLine : public QLineEdit public: explicit NewContactEditLine(QWidget *parent = nullptr); + void setText(const QString & text); protected: void focusInEvent(QFocusEvent* event) override;