Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/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:
    b15bd2b7-1a31-4cd1-b7f6-785f9cfe47a6-image.png
    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:
    4c23d7d9-cfe6-4090-82d3-bc658daf6981-image.png
    (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