I have a QTreeView in a QDialog that displays a hierarchical view of a text report. I want it to display fully expanded .. but it is always initially fully collapsed. There is a combo box in the QDialog that lets the user change the expand level after the report is displayed. The combo box index changed signal is connected to a slot that uses expandAll() and collapseAll() and some custom code to expand other levels if selected. It works fine... after the report is displayed. I have tried sending expandAll() directly after loading the data, in the showEvent of the QDialog, in the loading function for the data.. all the functions execute when I think they should... but the tree is collapsed when it is displayed initially. Any suggestions of more things to try?
Bookmarks