0

I have some particular QComboBox like this (osx style):

enter image description here

that I want to highlight programmatically. I used

combo->setStyleSheet("background-color: yellow");

and the background get changed, but then the whole style of my widget becomes ugly like this:

enter image description here

as you can see, the background is ok, but dropdown button got changed with '90 motif style (old good days...)

Is it possible to just change the background?

bibi
  • 3,671
  • 5
  • 34
  • 50

1 Answers1

1

Some of the stylesheet rules will trigger a fallback to the Windows style, see my answer here.

One option to style the background is by using QProxyStyle.

Changing the palette might also work.

Thomas McGuire
  • 5,308
  • 26
  • 45