| Summary: | editable QCombobox cuts Text at top and bottom | ||
|---|---|---|---|
| Product: | [Unmaintained] Necessitas | Reporter: | Martin Koller <martin> |
| Component: | Android Qt4 | Assignee: | BogDan Vatra <bogdan> |
| Status: | RESOLVED UNMAINTAINED | ||
| Severity: | normal | CC: | qt |
| Priority: | HI | ||
| Version First Reported In: | beta1 | ||
| Target Milestone: | Beta 2 | ||
| Platform: | Android | ||
| OS: | Android 4.x | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Martin Koller
2012-10-30 17:54:48 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); "
);
|