Hello,
I see 2 solutions to sort/filter the model :
1- I think the easiest way is to send a SQL query to your SGBD which return sorted/filtered data you need : so instead of
qxFetchAll() method, you could use
qxFetchByQuery() method with a SQL query.
2- All QxOrm models inherit from
qx::IxModel base class/interface, which inherit from
QAbstractItemModel Qt class : so all QxOrm models are Qt models.
So the QSortFilterProxyModel Qt class (which is a just wrapper to an existing model) can be a good solution to implement sort/filter feature :
http://doc.qt.io/qt-5/qsortfilterproxymodel.htmlBut you have to create a QSortFilterProxyModel sub-class yourself, QxOrm library doesn't provide any class for that.
You can find 2 examples on Qt web site :
-
http://doc.qt.io/qt-5/qtwidgets-itemvie ... ample.html -
http://doc.qt.io/qt-5/qtwidgets-itemvie ... ample.htmlIf you choose this second solution and need some help, I think a Qt forum is a better place to ask questions about Qt model/view features.