Important: Please read the Qt Code of Conduct -

Tree of widgets

  • I want to have a tree of widgets, so there would be a a header for each it, and the item itself is just a widget of any kind. And it could be expanded to show the widget, or it could hide the widget and only the title would show, just like a normal tree widget, only with the freedom of having any kind of widget at each tree item.

    can anyone please advise how to create such a thing using something ready at Qt? or do I need to do it my self?

  • Moderators

    For static content you can use "setItemWidget":
    For anything more fancy you can use QTreeView and QItemDelegate like described in the link above.

Log in to reply