From 8a60f57462cab5203aae5892a590a8bf767acd63 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Sun, 8 Mar 2015 21:33:02 +0100 Subject: [PATCH] [Android]: Ensure clicking on the arrow shows the popup This was a problem with editable comboboxes specifically as there is an edit field area which is separate to the arrow. Giving a valid rectangle for the arrow allows QComboBox to know that it was clicked on. Task-number: QTBUG-44931 Change-Id: Ie1d06a6631d6c7f5e813419a5e76f67ec9dcd7e8 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/widgets/styles/qandroidstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/widgets/styles/qandroidstyle.cpp b/src/widgets/styles/qandroidstyle.cpp index a5a75dae02..18074b7aed 100644 --- a/src/widgets/styles/qandroidstyle.cpp +++ b/src/widgets/styles/qandroidstyle.cpp @@ -1811,6 +1811,10 @@ QRect QAndroidStyle::AndroidSpinnerControl::subControlRect(const QStyleOptionCom { if (sc == QStyle::SC_ComboBoxListBoxPopup) return option->rect; + if (sc == QStyle::SC_ComboBoxArrow) { + const QRect editField = subControlRect(option, QStyle::SC_ComboBoxEditField, widget); + return QRect(editField.topRight(), QSize(option->rect.width() - editField.width(), option->rect.height())); + } return AndroidControl::subControlRect(option, sc, widget); }