[SOLVED] How to show branch/child indicator for QStandardItem
-
Hello,
I have QTreeView which uses QStandardItemModel/QStandardItem to show remote directories and files. I dont want to populate all dirs until the branch icon is clicked.
So is there any way to show the indicators as in QTreeWidgetItem::setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator) ?Thanks!
-
Hi,
AFAIK, you need to have a child to have the indicator. What you could do is put a dummy child that says e.g. "Loading.." and that you will replace once you have your data.
Hope it helps
-
[quote author="SGaist" date="1411656962"]Hi,
AFAIK, you need to have a child to have the indicator. What you could do is put a dummy child that says e.g. "Loading.." and that you will replace once you have your data.
Hope it helps[/quote]
Thank you! It works as wonderful. Later when i populate the dirs i will remove the empty "Loading.." item. -
Great !
Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)