adding proxy models and search to all sql models
This commit is contained in:
parent
45fbbde792
commit
57ffdc3ff0
8 changed files with 75 additions and 6 deletions
|
|
@ -238,3 +238,14 @@ QVariantMap PresentationSqlModel::getPresentation(const int &row) {
|
|||
}
|
||||
return data;
|
||||
}
|
||||
// PresentationProxyModel
|
||||
|
||||
PresentationProxyModel::PresentationProxyModel(QObject *parent)
|
||||
:QSortFilterProxyModel(parent)
|
||||
{
|
||||
PresentationSqlModel *presentationModel = new PresentationSqlModel;
|
||||
setSourceModel(presentationModel);
|
||||
setDynamicSortFilter(true);
|
||||
setFilterRole(Qt::UserRole + 1);
|
||||
setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue