QT treeview to display Different Option Panes.
-
![alt text]( image url)
I have implemented QItemDelegate to display but how do i make nested dropdown from root shadow element to display second level of tree depth. i do have a list of objects to edit using tree view. How to accomplish such a task.
I see the easiest way to use a listview and second table view to edit.
Could anybody guide next steps to solve the problem. Is Treeview the last option to consider. Using abstractmodel doesn't let to set up Widgets. I can't understand how to attach Delegates. No example online to Delegate TreeViews. -
What's your exact problem? The treeview in your picture can be easily be build with a simple QTreeView + itemmodel without the use for any other widget or the need for an item delegate
-
@Christian-Ehrlicher Excuseme, I forgot to mention that to edit child elements i need to use QComboBox and Buttons. on stackoverflow setting up widgets within nested tree objects is wrong.
I have found a method to set a widget, but i will use many slots to call back instead of MVC. TreeView MVC example project uses only text. -
Hi
Delegates are handy for such custom edit.
For combo box see
https://wiki.qt.io/Combo_Boxes_in_Item_Views
for a very special one, see
http://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html
for a button, this could be an example
https://stackoverflow.com/questions/11777637/adding-button-to-qtableview