For large amounts of data the QTreeWidget is far from the best option. Create your own class inheriting from QAbstractItemModel that implements the behavior you need and use a QTreeView to view it's contents. It will be much much faster that way. Have a good look at Model/View Programming.
Bookmarks