Hello all,
I have a SQL table (SQLite) with the following structure:
CREATE TABLE filters (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(30), key VARCHAR(30), parent INTEGER, FOREIGN KEY(parent) REFERENCES filters(id))
There is a column “parent” which indicates the parent of each item. I would like to load it in a QTreeView. I already get all the data from a QSqlTableModel but the table is flat, meaning with no parent-child relationship. How can I make this happen?
Thanks in advance!
↧