7 setDragDropMode(QAbstractItemView::InternalMove);
8 setMovement(QListView::Snap);
14 connect(
this, SIGNAL(itemEntered(QListWidgetItem*)),
this, SLOT(
enter(QListWidgetItem*)));
15 connect(
this, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(
change(QListWidgetItem*)));
19 bool reordered =
false;
20 QListWidgetItem* reselect = 0;
21 QList<QVariant> newItems;
24 for(
int i = 0; i < c; i++){
25 QListWidgetItem* itm = item(i);
27 newItems.append(data);
40 reselect->setSelected(
true);
41 setCurrentItem(reselect);
60 QList<QVariant> newItems;
62 for(
int i = 0; i < c; i++){
63 QVariant data = this->item(i)->data(
DATA_ROLE);
66 data = QUuid::createUuid();
69 newItems.append(data);