Search code examples
c++qtdrag-and-dropsignals-slots

Distinguish Qt itemChange signal on item when move and edit


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?


Solution

  • Copy of comment:
    check other signals (documented in parent class) there is lots of possibilities (data change, move row/column).