From 8cfb4b13f26cec529a1675ba96eed72d768784d0 Mon Sep 17 00:00:00 2001 From: chinhodado Date: Wed, 5 Aug 2015 20:36:58 -0400 Subject: [PATCH] Fixup: Capture Tab for QLineEditKeyConfig, and don't enable Tab focus for it --- src/citra_qt/config/QLineEditKeyConfig.cpp | 4 ++++ src/citra_qt/config/QLineEditKeyConfig.h | 2 +- src/citra_qt/config/inputs.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/citra_qt/config/QLineEditKeyConfig.cpp b/src/citra_qt/config/QLineEditKeyConfig.cpp index aa77bb410..ffb2f7049 100644 --- a/src/citra_qt/config/QLineEditKeyConfig.cpp +++ b/src/citra_qt/config/QLineEditKeyConfig.cpp @@ -27,3 +27,7 @@ void QLineEditKeyConfig::keyPressEvent(QKeyEvent* event) { emit ValueChanged(button, event->key()); } + +bool QLineEditKeyConfig::focusNextPrevChild(bool next) { + return false; +} diff --git a/src/citra_qt/config/QLineEditKeyConfig.h b/src/citra_qt/config/QLineEditKeyConfig.h index 8956a1706..944953beb 100644 --- a/src/citra_qt/config/QLineEditKeyConfig.h +++ b/src/citra_qt/config/QLineEditKeyConfig.h @@ -22,7 +22,7 @@ public: Settings::NativeInput::Values button; QLineEditKeyConfig(Settings::NativeInput::Values button, QWidget* parent = nullptr); void keyPressEvent(QKeyEvent* event) override; - + bool focusNextPrevChild(bool next) override; signals: void ValueChanged(Settings::NativeInput::Values, int); }; diff --git a/src/citra_qt/config/inputs.cpp b/src/citra_qt/config/inputs.cpp index a29fb7360..b6eb4abb6 100644 --- a/src/citra_qt/config/inputs.cpp +++ b/src/citra_qt/config/inputs.cpp @@ -21,6 +21,7 @@ GInputsDialog::GInputsDialog(QWidget* parent) : QDialog(parent) { // create the lineEdits for (int i = 0; i < Settings::NativeInput::NUM_INPUTS; ++i) { lineEdits[i] = new QLineEditKeyConfig(Settings::NativeInput::All[i]); + lineEdits[i]->setFocusPolicy(Qt::ClickFocus); } // put the lineEdits and their labels into a grid