Styling of QComboBox Arrow
-
Hello at all,
is it possible to change the size of the Dropdown-Arrow image inside of the element? It will always expand to the complete size of the element. With padding it wont work as expected.
QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 36px; height: 36px; background-color: red; }
Thats how it looks like with the above spectified code:
And thats how it should look like:
With QComboBox::drop-down:button its working but I need to style the disabled state also and QComboBox::drop-down:button:disabled wont work.
Thanks for your replys. Kind regards
-
Hello at all,
is it possible to change the size of the Dropdown-Arrow image inside of the element? It will always expand to the complete size of the element. With padding it wont work as expected.
QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 36px; height: 36px; background-color: red; }
Thats how it looks like with the above spectified code:
And thats how it should look like:
With QComboBox::drop-down:button its working but I need to style the disabled state also and QComboBox::drop-down:button:disabled wont work.
Thanks for your replys. Kind regards
QComboBox::drop-down:button{ background-color: red; width: 36px; } QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 26px; height: 24px; background-color: red; padding: 5px; } QComboBox::down-arrow:disabled { background-color: #CCC; }
Thats working. Styling :button flattens the button. And then settings the height and width with matching padding, resizes the down-arrow field over the button field.
-
Hello at all,
is it possible to change the size of the Dropdown-Arrow image inside of the element? It will always expand to the complete size of the element. With padding it wont work as expected.
QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 36px; height: 36px; background-color: red; }
Thats how it looks like with the above spectified code:
And thats how it should look like:
With QComboBox::drop-down:button its working but I need to style the disabled state also and QComboBox::drop-down:button:disabled wont work.
Thanks for your replys. Kind regards
-
Hello at all,
is it possible to change the size of the Dropdown-Arrow image inside of the element? It will always expand to the complete size of the element. With padding it wont work as expected.
QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 36px; height: 36px; background-color: red; }
Thats how it looks like with the above spectified code:
And thats how it should look like:
With QComboBox::drop-down:button its working but I need to style the disabled state also and QComboBox::drop-down:button:disabled wont work.
Thanks for your replys. Kind regards
QComboBox::drop-down:button{ background-color: red; width: 36px; } QComboBox::down-arrow { image: url(://img/icons/white/arrow-down-circle.svg); width: 26px; height: 24px; background-color: red; padding: 5px; } QComboBox::down-arrow:disabled { background-color: #CCC; }
Thats working. Styling :button flattens the button. And then settings the height and width with matching padding, resizes the down-arrow field over the button field.
-
-
@sp3x Another question I want to ask is, where are all the possible css options documented in the Qt Docs related to their widgets?
I.e. where can I get further infos about QComboBox::drop-down:button?
@sp3x said in Styling of QComboBox Arrow:
where can I get further infos about QComboBox::drop-down:button?
Here
In general, the standard CSS syntax is used (for colors, keywords like background and so on).