Reputation: 2316
I have QTreeView and QStandatdItemModel. I have slot that connected to itemChanged signal, where I work up with new item data. Then I activated drag and drop possibility and find out that on mowing item I also receive itemChanged signal. But signature is only QStandardItem*, so I can't say what have happened - was item data changed or was it just moved, but I need to know that. How can distinguish was item changed or moved?
Upvotes: 0
Views: 598
Reputation: 37717
Copy of comment:
check other signals (documented in parent class) there is lots of possibilities (data change, move row/column).
Upvotes: 1
Reputation: 12321
Use the dataChanged
signal instead.
This signal is emitted whenever the data in an existing item changes.
Upvotes: 1