Re: Delegate and Stylesheet
How are you painting in your custom item delegate ?
I dont think you are using QStyle functions to draw...
Re: Delegate and Stylesheet
here one technique using QLabel as content renderer
Code:
void SomeItemDelegate
::paint(QPainter *painter,
{
renderer.setStyleSheet(getStyleSheet(index));
renderer.setText(makeDisplayString(index));
renderer.resize(option.rect.size());
painter->save();
painter->translate(option.rect.topLeft());
renderer.render(painter);
painter->restore();
}
Re: Delegate and Stylesheet
Thanks, this helped me a lot!