For QTreeWidget it won't be that easy. If you were using the model approach, you could simply return false from QAbstractItemModel::insertRows() implementation if it would create a branch. It is possible you can obtain a similar effect with the tree widget if you clear the ItemIsDropEnabled flag on leaves of the tree.





Reply With Quote
Bookmarks