Bug 309265 - editable QCombobox cuts Text at top and bottom
Summary: editable QCombobox cuts Text at top and bottom
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Necessitas
Classification: Unmaintained
Component: Android Qt4 (show other bugs)
Version: beta1
Platform: Android Android 4.x
: HI normal
Target Milestone: Beta 2
Assignee: BogDan Vatra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 17:54 UTC by Martin Koller
Modified: 2016-11-06 09:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Koller 2012-10-30 17:54:48 UTC
I'm using a QDialog which shows a QComboBox. On the Android device, the editable text is not shown completely as there is an area at the top and at the bottom which is cutted (so you just see a horizontal stripe of the text in the line edit).
It also does not help if I define a minimal height for this widget - the minimum size is simply ignored [ combo->setMinimumSize(QSize(0, 40)); ]



Reproducible: Always
Comment 1 Sebastian 2013-01-14 22:48:24 UTC
The problem is the StyleSheet of the ComboBox's LineEdit, which is private. To change the style I had to subclass the QCombobox and add this to it:

QLineEdit * MyComboBox::editor () const
{
    return this->lineEdit();
}

Now you can style the lineEdit of the editor:

comboBox->editor()->setStyleSheet(
                "padding-top: 0px; "
                "padding-bottom: 0px; "
                "margin:0px; "
                "color: rgb(90,31,0); "
                "background-color: rgb(253, 231,146); "
                );