Not able to see plus sign even if I pass true from hasChildren function in Qt
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.
Re: Not able to see plus sign even if I pass true from hasChildren function in Qt
Have you tried your model with the standard tree view?
Have you tried your view with an existing tree model, e.g. QFileSystemModel?
Cheers,
_
Re: Not able to see plus sign even if I pass true from hasChildren function in Qt
I have customized my view and model both.
re implemented QTreeView & QAbstractItemModel.
Re: Not able to see plus sign even if I pass true from hasChildren function in Qt
Yes, you already wrote that.
Cheers,
_
Re: Not able to see plus sign even if I pass true from hasChildren function in Qt
Quote:
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.
Re: Not able to see plus sign even if I pass true from hasChildren function in Qt
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,
_