QSqlRelationalDelegate subclass that works with QSqlRelationalTableModel
When you are using a QSqlRelationalTableModel in combination with QSortFilterProxyModel, you lose the automatic combobox that is displayed in a QTableView.
This is a subclass of QSqlRelationalDelegate, that works:
COMMENT: To use it with another proxy model (my own QXTreeProxyModel that converts a table to a tree that can be displayed by QTreeView), I replaced QSortFilterProxyModel by QAbstractProxyModel throughout the code in mysqlrelationaldelegate.cpp; no other changes were necessary. BTW, QXTreeProxyModel is available on https://github.com/Al-/QXTreeProxyModel