Answer the question
In order to leave comments, you need to log in
How to sort by match (QSqlTableModel )?
Hello everyone)
I am using QSqlTableModel.
The QtableView should first show the entries for author = 'user' and below all the other entries.
Tried model->setFilter(QString(AUTHOR" like 'user' ")); but the rest of the records are not displayed (which is obvious).
ps: If you write model->setFilter(QString(AUTHOR" like 'user%' ")); More records are displayed for user2
So far, nothing more has come up.
Answer the question
In order to leave comments, you need to log in
as always, you need to dance from the final sql query
, you should end up with something like this
I write in a muscular dialect close to my heart, in standard t-sql it will be a bit different
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question