Re: QTreeView Not displaying
Can the model actually read the file? But you say the model was created fine, so I guess it can.
Did you change the code after copying it? If so, please post the code.
Re: QTreeView Not displaying
I copied the itemtree and itemmodel headers and source exactly.
Re: QTreeView Not displaying
You need to create your model on the heap:
Code:
TreeModel *model = new TreeModel(file.readAll());
file.close();
ui->navigationTreeView->setModel(model);
//ui->navigationTreeView->show();
Re: QTreeView Not displaying
That worked perfectly. Thank you!