QTableView and QStyledItemDelegate Persistent Editor Issue
I have a QTableView and a QStyledItemDelegate derived class. I call tableView->setItemDelegateForColumn(0, new SpinBoxDelegate()) in the table constructor. When a row is added, I call tableView->openPersistentEditor(index). At this point I'd expect each cell to always show the SpinBox editor, but it only shows when the cell is clicked and enters into editing mode. Am I missing something?
Re: QTableView and QStyledItemDelegate Persistent Editor Issue
I was able to get this working by doing something like:
Code:
{
_spinBox->setGeometry(option.rect);
_spinBox->setValue(index.data().toInt());
painter->drawPixmap(option.rect.x(), option.rect.y(), map);
}
Re: QTableView and QStyledItemDelegate Persistent Editor Issue
@Linnda23: Use the "Thanks" button, please. It is a lot more effective than simply quoting a reply and adding a +1 and a broken image link.