Reputation: 12276
I write in C++ using Qt, and I have a list widget.
I enabled internal drag & drop, using:
list->setDragDropMode(QAbstractItemView::InternalMove);
What should I do for catching the signal that says that such a drag & drop action was done?
Thanks!
Upvotes: 2
Views: 2425
Reputation: 4607
Just assuming this is the sort of signals your looking for...
myList->model()->rowsMoved()
or myList->model()->layoutChanged
Links to docs:
QAbstractItemModel::layoutChanged
Example:
connect(list->model(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SLOT(myFunction()));
Upvotes: 8