expand() and expandAll() are slots. setExpanded() probably invokes one of these slots. It probably doesn't work because your code doesn't return to the Qt event loop so it can handle the calls to the slots. The fact that it doesn't happen until you "do some GUI action later" is a big clue.
The trick is to change your app so it isn't compute bound - a major cause of GUI unresponsiveness.




Reply With Quote
Bookmarks