Quote Originally Posted by axeljaeger View Post
Use void QAbstractItemView::setIndexWidget ( const QModelIndex & index, QWidget * widget )
See also the warning in the documentation that you have to create a delegate if you want anything sensible with the widget. Generally, adding widgets to an itemview is a bad idea because it does not scale. If you 1000 rows, you need 1000 widgets in a naive implementation. The better implementation is to have only as much widgets as currently visibie and reuse widgets that get out of view for the appearing rows during scrolling. Basically, that is what the delegate does.
So, then the custom widget is "placed" into delegate and delegate then handles number of showing widgets?