@Chris-Kawa
Thanks for the reply
I messed up as you mentioned above . I used your code to make it work. thank you ;)
QList<QColor> colors = { QColor::fromRgb(0,102,104,255), QColor::fromRgb(102,102,104,255), QColor::fromRgb(0,0,104,255) };
for(int i = 0; i < colors.size(); ++i)
combo->setItemData(i, colors[i], Qt::BackgroundRole);