PDA

View Full Version : Not able to see plus sign even if I pass true from hasChildren function in Qt



DURGAPRASAD NEELAM
23rd April 2015, 11:19
Hi,
I am implementing tree view, I have sub classed my model and view. initially I am populating all the top level items and I don't know how many child's are there for each top level items but I know all the top level items has a child's, so I have re-implemented hasChildren() function and pass true for all the top level items, but I am not able to see + sign for the top level items even i pass true. Please let me know the problem

Thanks in advance.

anda_skoa
23rd April 2015, 12:18
Have you tried your model with the standard tree view?
Have you tried your view with an existing tree model, e.g. QFileSystemModel?

Cheers,
_

DURGAPRASAD NEELAM
23rd April 2015, 12:58
I have customized my view and model both.

re implemented QTreeView & QAbstractItemModel.

anda_skoa
23rd April 2015, 14:46
Yes, you already wrote that.

Cheers,
_

DURGAPRASAD NEELAM
23rd April 2015, 15:33
Have you tried your model with the standard tree view?
Have you tried your view with an existing tree model, e.g. QFileSystemModel?

I have tried my model with Qtreeview and my view with QStandardItemModel. I could see same result.

anda_skoa
23rd April 2015, 16:14
So if you have a QStandardItemModel, you are not seeing any expand indicators either?

Just to verify: using that model with a QTreeView works, right?

Cheers,
_