PDA

View Full Version : How do I change the options for a custom QComboBox delegate?



jmalicke
7th November 2014, 01:43
I wrote a custom delegate that renders a QComboBox. I installed it to a column with QTableView::setItemDelegateForColumn().

At some point later, I need to update the options in the combo box. How would I do this?

wysota
7th November 2014, 09:34
Access the editor and modify it. What's the problem?

jmalicke
7th November 2014, 20:32
The key was discovering QAbstractItemView::itemDelegateForColumn. Somehow I had missed this when glancing over the API docs.