PDA

View Full Version : Customizing tree widget using existing widgets



icarus
25th October 2012, 15:50
Hello,

i am currently using a QTreeWidget to display hierarchical data consisting of groups and items (thus a two-level hierarchy). Unfortunately the presentation of the information as well as the interaction is everything but clear and comfortable, which is why I want to redesign the widget which is roughly depicted in the following graphic:

8354

In order to do that I spend some hours of research on how to approach this in the best way. Unfortunately, I discovered many hints how different aspects could be achieved but found no advice that really fits to my whole example. Also I yet do did not understand the whole model view mechanism for the List/Table/Tree views. I did some experiments QItemDelegate which seems however unappropiate to me, as I could not find a way to use existing widgets (e.g. QPushButton) with it. Subclassing QTreeWidgetItem seems to be another possibility but again I do not know how to embed exisiting widgets.

I hope someone can give me an advice where to start.