3

Is there some way to make sure that updating an existing QTreeWidgetItem or inserting a new one ensures that the item is unique among its siblings based on the value of a single column?

I have tried to do something like this with a QTreeView and my own custom model and have gotten it to work, but some advanced features like moving items with drag and drop are eluding me. I figure, the QTreeWidget and QTreeWidgetItem classes ought to get more of this type of stuff for free and ought to cause me fewer headaches throughout. However, I still need to be able to guarantee uniqueness if I go the QTreeWidget route. Can this be done? If so, how?

NOTE:

I am using PySide, but I marked this question as PyQt as well since most solutions cross over between the two without much fuss.

eestrada
  • 1,575
  • 14
  • 24
  • 1
    It has been so long. But for anyone interested [this](https://stackoverflow.com/questions/54443129/pyqt-validity-check-on-qtreewidgetitem/54452709#54452709) might be helpful. – Jason Jan 31 '19 at 03:05

0 Answers0