Important: Please read the Qt Code of Conduct -

How to set persistent item widget on tree item

  • Hey

    If I do treeview->setIndexWidget(item->index(),widget) and then perform drag&drop operation with the item, the dropped item will no longer have widget on it and wit will revert to its primal form. How can I retain the widget?


  • Lifetime Qt Champion


    That is something that you have to implement yourself. Using setWidget as explained in the documentation is to be used to show static content.

Log in to reply