Hi.

I want to use the data from a QSqlQueryModel into a QTreeView. But modeling the data into a tree with QProxyModel.

The SQL (create table) code is:
Qt Code:
  1. CREATE TABLE categories(
  2. id INTEGER PRIMARY KEY,
  3. parent INTEGER,
  4. image VARCHAR(128),
  5. name VARCHAR(32)
  6. )
To copy to clipboard, switch view to plain text mode 

parent has the id of the parent

Thanks