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. QTreeWidget questions

QTreeWidget questions

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 911 Views 1 Watching
  • 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.
  • BlackMambaB Offline
    BlackMambaB Offline
    BlackMamba
    wrote on last edited by
    #1

    Hello,

    I would like to reproduce the same kind of Tree that is shown on this attached image.
    I have two questions :

    • how to put the checkBox before the Top tree widget item on each line?
    • how to preserve the "qtreewidgetitem" idea by keeping the grid?
      What I mean is the following. If I take the first row on the picture, with the layer's name nab_ ... , if I do :
      @
      this->setItemWidget(topLevelItem,0, layer_name);
      this->setItemWidget(topLevelItem,1, checkBox);
      this->setItemWidget(topLevelItem,2, checkBox);
      this->setItemWidget(topLevelItem,3, checkBox);
      @
      etc ... then all these items (the checkboxes and the layer's name) don't belong to the same treewidgetitem.
      The issue is then for selection and for events.
      But if I create a CustomWidget with :
      QLabel(Layer_name) QCheckBox QCheckBox QCheckBox , and do
      @
      this->setItemWidget(topLevelItem,0,customWidget);
      @
      then it's ok for selection and for events but you lose the treeWidget's alignement in grid as you just have one widget which contains all the the subitems (checkbox and labels in this example).

    How to combine the two? (regroup the items in a widget for selection, events, etc ... and preserve the grid with the columns splitters etc ...) ?

    Cheers,!http://www.itsartmag.com/features/itsart/wp-content/uploads/2013/04/Adobe-After-Effects.jpg(Image After Effetcs)!

    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