Hi,
I have a QTableView with a delegate, this sets the row height of the table view, via override sizeHint:
{
if ( s.isValid() )
s.setHeight(20);
return s;
}
QSize MyClass::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
QSize s = QItemDelegate::sizeHint(option, index);
if ( s.isValid() )
s.setHeight(20);
return s;
}
To copy to clipboard, switch view to plain text mode
This works 100%. But if I set a new root index for the tableview:
void QAbstractItemView::setRootIndex ( const QModelIndex & index )
To copy to clipboard, switch view to plain text mode
the row height is set to default height. The delegate is ignored! I need a fixed row height, also after a new root index!
Does anyone know, what the problem is? How can I fix this?
Thanks!
Chris
Bookmarks