From 728e74df239bac0f61faea062bb5a45340ee6d24 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 1 Dec 2011 10:40:27 +0100 Subject: Force focus on combobox in altcombobox in order to avoid the inner widget gaining focus even though it is hidden. --- client/widgets/altcombobox.cc | 6 ++++++ client/widgets/altcombobox.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'client/widgets') diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc index 9956fff..082601a 100644 --- a/client/widgets/altcombobox.cc +++ b/client/widgets/altcombobox.cc @@ -107,6 +107,12 @@ AltComboBox::~AltComboBox() { } +bool AltComboBox::setKeyboardFocus() +{ + combobox->setFocus(); + return true; +} + QComboBox *AltComboBox::qcombobox() { return combobox; diff --git a/client/widgets/altcombobox.h b/client/widgets/altcombobox.h index e6a21d7..b0fb61c 100644 --- a/client/widgets/altcombobox.h +++ b/client/widgets/altcombobox.h @@ -94,6 +94,8 @@ public: QComboBox *qcombobox(); + bool setKeyboardFocus(); + public slots: void comboChanged(); void onChildChange(); -- cgit v1.2.3