Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Tree of widgets

Tree of widgets

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 739 Views
  • 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 Offline
    Y Offline
    yoavmil
    wrote on last edited by
    #1

    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
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved