Solved it,
actually, the delegate is not the problem,
when painting the current selection selection QCombobox uses a re-implantation of
@
void paintEvent(QPaintEvent *e)
@
so here is what I did: I created a class derived from QCombobox and re-implantation that func.:
@
void MyCombo::paintEvent(QPaintEvent *e)
{
//this part is a copy of the orgonal
Q_UNUSED(e)
QStylePainter painter(this);
painter.setPen(palette().color(QPalette::Text));
// draw the combobox frame, focusrect and selected etc.
QStyleOptionComboBox opt;
initStyleOption(&opt);
painter.drawComplexControl(QStyle::CC_ComboBox, opt);
//here is where the customization start!!!
QRect rect = opt.rect.adjusted(1,1, -20, -2); //compensate for frame and arrow
...
}
@
I might totally redo this func.... and get some nice results. this is what I like about Qt!