How to set background color of QComboBox button?
问题 Version/Environment: Windows 10 64 bit Qt 5.11.0 MSVC2017 64 bit I have a simple QComboBox to enable/disable a feature: QComboBox *onOffComboBox = new QComboBox(); onOffComboBox->insertItem(0, "Off"); onOffComboBox->insertItem(1, "On"); The combo box is added as a cell widget to a table: this->ui->settingsTable->setCellWidget(rowNumber, 1, onOffComboBox); Now i want to change the background color of the button but not the select items. My first approach was simply to use QWidget 's