Need help for delegate.paint. Does not work for me ...
-
I have a model / view schema.
I'm developing a general multipurpose delegates, and I'd want to use some custom widgets I have.
The first I have tested does not work:@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());@
I see an empty cell ?
I have read the doc searching something usefull about this but without success.
Can anybody help me ? Thanks.( the file chooser is as simple as a label plus a button. I can see it in other scenarios)
-
The widget, where you call render is invisble (show is never called). This implies, it is not painted.