[SOLVED]QSS for changing the width of the drop-down button
-
You can style the drop down button with
QComboBox::drop-down
sub-control and the arrow inside it withQComboBox::down-arrow
. Here's an example: Customizing QComboBox. -
@Chris-Kawa Yes, it can affect the common QComboBox, but it can not change the display of the drop-down button in the QDateEdit.
-
Ah yes, sorry. It seems
QDateEdit::drop-down
respects some of the properties but not width :/
If you're changing the background color or borders too then you might get away with adjusting margins, at least for a visual effect.
But in general this seems to be a bug so I'd consider reporting it on the bug-tracker. -
Great. Can you share how?
-
Certainly, but I don't know how to insert code. They are just like this:
QDateEdit{ border-radius: 5px; padding: 1px 10px 1px 5px; border: 1px solid #5CACEE; min-height: 30px; } QDateEdit::drop-down { subcontrol-origin: padding; subcontrol-position: top right; **width: 35px; ** border-left-width: 1px; border-left-style: solid; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-left-color: #5CACEE; } QDateEdit::down-arrow { border-image: url(:/Resources/array_down.png); height:30px; width:30px; }
[edit: added missing coding tags ``` SGaist]