Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

make user able to edit qtreewidget



  • I know how to create childs, parents, columns in qtreewidget, and make also items changeable through user input,
    However, I want to make it possible for a user to add new childs in the treewidget through the interface.

    Any idea if Qt has something built in for this matter?
    Thank you so much.


  • Lifetime Qt Champion

    Hi,

    Do you mean something like a contextual menu with an "insert here" action ?



  • Yes, so basically it's like creating a tree widget from scratch but the user who will do it in interface



  • @iwrwrc
    So --- as far as I know there is nothing supplied for this --- you have to do the code yourself. You could, for example, have an Add button, or as @SGaist wrote probably best if you do it via right-click context menus on nodes/leaves to insert/edit/delete.


Log in to reply