A
A
Alex Gorbunov2020-06-14 16:12:42
Qt
Alex Gorbunov, 2020-06-14 16:12:42

How is the custom addition of elements in the TreeView implemented?

For example, there are two buttons: "Add root" and "Add sub root". The first one adds the root element to the tree. There are no problems here. The second button should add a child element to the selected root node. How can such a thing be realized? I have already done this in C#/WinForms, but there were separate methods for this, how are things in Qt? Qt itself is new to me, of course.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ighor July, 2020-06-14
@Naratzull

Through models. https://doc.qt.io/qt-5/qtreeview.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question