Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. About PySide Qt UI design: define delegates as tree items
Forum Updated to NodeBB v4.3 + New Features

About PySide Qt UI design: define delegates as tree items

Scheduled Pinned Locked Moved Qt Creator and other tools
1 Posts 1 Posters 812 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.
  • P Offline
    P Offline
    picard47at
    wrote on last edited by
    #1

    Hello! I am doing a plug-in for maya. The tool I use is Qt PySide. I have trouble dealing with a custom treeview design.

    What i want to achieve is making a tree like structure, each item consist of a root and some child nodes(in the same layer). Each children consist of several elements such as combobox and push button, while the root only for showing text. Each tree item represent the information and the options of a render layer, the user can adds new tree item or remove an existed one.

    The concept is similar to these images:

    !https://farm4.staticflickr.com/3902/14479945668_e103dcd8b9_o.png()!

    !http://www.qtcn.org/bbs/attachment/Mon_1404/17_151213_257dff8c83ceef4.jpg?72()!

    The problem is I am not quite sure what is the proper way to combines different qt elements into a single child node.
    I hope there is a way to set tree node as a “table” like item, each item consists of different qt control elements. It’s similar to the idea below, while the cells of each column is qt controller instead of pure text.

    !http://qt-project.org/doc/qt-5/images/tree_2_with_algorithm.png()!

    http://qt-project.org/doc/qt-5/modelview.html

    Currently I define different delegates for each qt controllers (button, combobox… .etc.) . In order to set each cell as different element I use setItemDelegateForRow() and setItemDelegateForColumn(). However i haven’t find a correct way to make the tree index right.

    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