Turns out to be very easy. I reimplemented updateEditorGeometry in the delegate as follows, and that took care of it!

Qt Code:
  1. void MapTextDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const {
  2. QStyledItemDelegate::updateEditorGeometry(editor, option, index);
  3. editor->setGeometry(option.rect);
  4. }
To copy to clipboard, switch view to plain text mode