FAQ Database Discussion Community

Having A Working QSqlRelationalDelegate With QSortFilterProxyModel

I am using QSortFilterProxyModels all the time. However, if a QSqlRelation is setup on the source model, along with a QSqlRelationalDelegate on the view, whenever the view is switched to the proxy model, the QSqlRelationalDelegate disappears, leaving the basic QLineEdit or QSpinBox. How can I make columns in a view...

Wrong QModelIndex on QTreeView using custom QSortFilterProxyModel

I have a QTreeView based on a QStandardItemModel filled with subclassed QStandardItem. The Item-sublcass just has two more datapointers and do not effect the item in any other way, so PTSModelItem behaves like QStandardItem. I am using a custom QSortFilterProxyModel by subclassing filterAcceptsRow() to enable filtering on the custom datapointers....