tonnot
2nd November 2011, 18:10
I have the next code inside the paint event of a custom delegates:
void A_delegates::paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex& index) const
{
QRect the_rect(option.rect);
A_file_chooser file_chooser;
file_chooser.setGeometry(QRect(QPoint(0,0), the_rect.size()));
file_chooser.render(painter,the_rect.topLeft());
}
A_file_chooser is a customwidget with a label & button. It has tested (promoting it inside a form), I can see it.
Ok,in the case of the delegate I see my cell empty. (And the delegates, that shows another kind of widgets, works fine)
Any idea ? Any help would be appreciatted
Thanks.
void A_delegates::paint(QPainter* painter, const QStyleOptionViewItem & option, const QModelIndex& index) const
{
QRect the_rect(option.rect);
A_file_chooser file_chooser;
file_chooser.setGeometry(QRect(QPoint(0,0), the_rect.size()));
file_chooser.render(painter,the_rect.topLeft());
}
A_file_chooser is a customwidget with a label & button. It has tested (promoting it inside a form), I can see it.
Ok,in the case of the delegate I see my cell empty. (And the delegates, that shows another kind of widgets, works fine)
Any idea ? Any help would be appreciatted
Thanks.