From 0b7d8803f5b78f8d308e56e1c666f727d44b7401 Mon Sep 17 00:00:00 2001 From: Tobias Triffterer <tobias@ep1.ruhr-uni-bochum.de> Date: Wed, 11 Aug 2021 23:18:21 +0200 Subject: [PATCH] Fix Tab Sequence in LoginGui The tab key now cycles through the widgets in the proper sequence. For ease of use, the QTextEdit for the Start PIN takes the focus on construction although being the second widget in the order. --- l10n/fp311online-de.ts | 8 ++++---- src/logingui.cpp | 2 ++ ui/logingui.ui | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/l10n/fp311online-de.ts b/l10n/fp311online-de.ts index 576c800..b356a4e 100644 --- a/l10n/fp311online-de.ts +++ b/l10n/fp311online-de.ts @@ -206,22 +206,22 @@ Diese Messung bestätigt nur die Kalibration des Messaufbaus und benötigt aufgr <context> <name>Fp311Online::LoginGui</name> <message> - <location filename="../src/logingui.cpp" line="79"/> + <location filename="../src/logingui.cpp" line="81"/> <source>Connecting to server...</source> <translation>Verbinde mit dem Server...</translation> </message> <message> - <location filename="../src/logingui.cpp" line="89"/> + <location filename="../src/logingui.cpp" line="91"/> <source>Sending Start PIN to server...</source> <translation>Sende Start-PIN an den Server...</translation> </message> <message> - <location filename="../src/logingui.cpp" line="105"/> + <location filename="../src/logingui.cpp" line="107"/> <source><html><body><p>Login to server successful!</p><h3>Welcome, </source> <translation><html><body><p>Login auf dem Server erfolgreich!</p><h3>Willkommen, </translation> </message> <message> - <location filename="../src/logingui.cpp" line="132"/> + <location filename="../src/logingui.cpp" line="134"/> <source>An error occured: </source> <translation>Ein Fehler ist aufgetreten:</translation> </message> diff --git a/src/logingui.cpp b/src/logingui.cpp index acecb48..c2dd280 100644 --- a/src/logingui.cpp +++ b/src/logingui.cpp @@ -54,6 +54,8 @@ LoginGui::LoginGui() const QRect buttonTextSize = _ui.cmdShowLegalStuff->fontMetrics().boundingRect(_ui.cmdShowLegalStuff->text()); _ui.cmdShowLegalStuff->setMaximumSize(buttonTextSize.width() + 50, _ui.cmdLogin->height() + 5); connect(_ui.cmdShowLegalStuff, &QPushButton::clicked, this, &LoginGui::showLegalStuff); + + _ui.txtStartPin->setFocus(); } void LoginGui::doLogin() diff --git a/ui/logingui.ui b/ui/logingui.ui index 9c35d70..7f4f017 100644 --- a/ui/logingui.ui +++ b/ui/logingui.ui @@ -189,9 +189,10 @@ This software is built using the <a href="https://qt.io">Qt Fram <widget class="QStatusBar" name="statusbar"/> </widget> <tabstops> + <tabstop>txtUrl</tabstop> <tabstop>txtStartPin</tabstop> <tabstop>cmdLogin</tabstop> - <tabstop>txtUrl</tabstop> + <tabstop>cmdShowLegalStuff</tabstop> </tabstops> <resources> <include location="../res/resources.qrc"/> -- GitLab