Turns out to be very easy. I reimplemented updateEditorGeometry in the delegate as follows, and that took care of it!
QStyledItemDelegate::updateEditorGeometry(editor, option, index);
editor->setGeometry(option.rect);
}
void MapTextDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const {
QStyledItemDelegate::updateEditorGeometry(editor, option, index);
editor->setGeometry(option.rect);
}
To copy to clipboard, switch view to plain text mode
Bookmarks