SomethingSomething
SomethingSomething

Reputation: 12276

Qt, C++: QListWidget internal drag&drop - how to connect to signal?

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

Answers (1)

AngryDuck
AngryDuck

Reputation: 4607

Just assuming this is the sort of signals your looking for...

myList->model()->rowsMoved() or myList->model()->layoutChanged

Links to docs:

QAbstractItemModel::rowsMoved

QAbstractItemModel::layoutChanged

Example:

connect(list->model(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SLOT(myFunction()));

Upvotes: 8

Related Questions