I think you should try one of the two!
You could use model/view programming or directly use QTreeWidget.