I have a QCombobox and I want to set a white background color.This is my code.
QComboBox *cBox = new QComboBox;
cBox->addItem("Text1");
cBox->setStyleSheet("background-color:white");
This combobox has a parent widget whose background is an image and is set as given below:
ui->centralWidget->setStyleSheet("border-image:url(./image.png)");
When I set the parent Widget[centralWidget] background as some other color,then the white BG works properly for the combobox.But when I set an image as the parent Widget background,the UI looks like this.
In the above pic,the black Bg is an image.Could someone highlight me what am I missing.Any help will be really helpful.