PDA

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



jmalicke
7th November 2014, 00: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, 08:34
Access the editor and modify it. What's the problem?

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