I am working on an application in which I need to show the List of Program Names and corresponding Icons in a Combobox Popup Menu.

I tried following things:

a. Created the Custom Widget deriving from QCombobox b. ReImplemented the showPopup() function as follows

void CMyComboBox::showPopup()
{
QComboBox::showPopup();
mp_Popup = this->findChild<QFrame *>();
mp_Popup->move( mp_Popup->x(), mp_Popup->y() - this->height() - mp_Popup->height() );
}

b. Adding Items to Combobox QString Name = "XYZ"; QIcon icon("Sample.png");

myComboBox->insertItem(0, icon, Name);

Question is: When I insert using above method, it inserts the Icon at the left side(i.e.., Icon followed by Name) . How do I make the Icons to come at the Right Side(i.e.., Name First then the Icon)

Regards Santhosh