Important: Please read the Qt Code of Conduct -

How to change QCombobox's look and feel?

  • I want to change a QCombobox's look and feel just like this:
    the drop-down list are color blocks and color name, the combobox shows which color was selected by drawing a color line.
    Now, I make it like this:
    (Every item is a widget and I draw the color block and color name in it's paintEvent().)
    How can I draw a color line on the left of a combobox? Any suggestion would be appreciated!

Log in to reply