I've seen the solution for python, but I need to know how to do it outside of python.
Here is what I have:
myTree->topLevelItem(0) does not return
nullptr, you can use the following:
myTree->setCurrentItem( myTree->topLevelItem(0), // item 0, // column QItemSelectionModel::Select // command );
See Qt's documentation.