Som*_*ing 2 c++ qt drag-and-drop
我使用Qt用C++编写,我有一个列表小部件.
我启用了内部拖放功能,使用:
list->setDragDropMode(QAbstractItemView::InternalMove);
Run Code Online (Sandbox Code Playgroud)
我应该怎么做才能捕捉到这样一个拖放动作完成的信号?
谢谢!
只是假设这是你要寻找的那种信号......
myList->model()->rowsMoved() 要么 myList->model()->layoutChanged
指向文档的链接:
QAbstractItemModel::layoutChanged
例:
connect(list->model(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), this, SLOT(myFunction()));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1296 次 |
| 最近记录: |