I have the next code inside the paint event of a custom delegates:
{
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());
}
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());
}
To copy to clipboard, switch view to plain text mode
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.
Bookmarks