Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Assigning index 0 to an item in an SQLite db table field
gabor53 last edited by
I have a ComboBox which is populated from an SQLite db. I use the first item in the column as a "placeholder text" so it should stay index 0 to display the right text. The original (unsorted) list looks like this:
and I want to keep The Friend is a .... text on top.
SO how can I sort everything but also keep The Friend is a .... index on the top?
Thank you for your help.
JonB last edited by JonB
To do your sorting are you interposing a
QSortFilterProxyModelas the model between the
QSqlQuery/TableModelfor your database?
And/or/also, how are using "the first item in the column as a "placeholder"? Does it come back as a row from the database, do you insert it somewhere, how/what?