Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Tree of widgets

    General and Desktop
    2
    2
    609
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yoavmil last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        For static content you can use "setItemWidget":http://qt-project.org/doc/qt-5/qtreewidget.html#setItemWidget
        For anything more fancy you can use QTreeView and QItemDelegate like described in the link above.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post