How to use QColumnView with QSqlTableModel
Hello, how I can use a QColumnView to display the items of a QSqlTableModel?
For example, if I define something like this code:
Code:
model->setTable("dataBaseTable");
model->select();
QColumnView *view = new QColumnView;
view->setModel(model);
I obtain the elements of the first column of the dataBaseTable in the left column of the view, but when I click one element in the view, how I can to see more elements in the next column view?
Thanks
Re: How to use QColumnView with QSqlTableModel
I think you want to use QTableView instead of QColumnView.
What is that you want to do with QColumnView? It is normaly required for tree models not for table model.
Re: How to use QColumnView with QSqlTableModel
I want to use QColumnView to show four nested lists of elements. I thought to use QSqlTableModel because I read this elements from a SQL table.