First of all, the code you posted is very weird.
Why do you code the implementation in the header? Are you coming from a C# world?
I copied your code and tried it for myself. It doesn't crash for me.
Post the error you get please.
The use of ui is a little bit strange to me.May i use QTreeWidget improperly?![]()
And you should include QTreeWidgetItem
Bookmarks