Assigning index 0 to an item in an SQLite db table field
Unsolved
QML and Qt Quick
-
Hi,
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.
After sorting:
SO how can I sort everything but also keep The Friend is a .... index on the top?
Thank you for your help. -
@gabor53
To do your sorting are you interposing aQSortFilterProxyModel
as the model between theQComboBox
and yourQSqlQuery/TableModel
for 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?