Hi,<br><br>After creating a QListWidget, I enabled dragging and set drag-drop-mode to QAbstractItemView.InternalMove. I am able to re-order the QListWidgetItems within this widget by selecting and dragging the selected items around. But when I drop the selected items, shouldn't an indexedMoved signal be emitted?<br>
<br>Here is my code:<br><div style="margin-left: 40px;">def moved (self, indexes):<br> print "moved"<br><br>app = QApplication (sys.argv)<br>widget = QListWidget()<br>widget.setAcceptDrops (True)<br>widget.setDragEnabled (True)<br>
widget.setDragDropMode (QAbstractItemView.InternalMove)<br>QObject.connect (widget, SIGNAL ("indexesMoved(QModelIndexList)"), moved) <br><br>QListWidgetItem ("item 1", widget)<br>QListWidgetItem ("item 2", widget)<br>
QListWidgetItem ("item 3", widget)<br>QListWidgetItem ("item 4", widget)<br></div><br><div style="margin-left: 40px;">widget.show()<br>app.exec_()<br></div><br>When I moved an item around, moved() should have been invoked, but is not. Why? I am using PyQt v3.17.6. Thanks in advance.<br>
<br>Regards,<br>Fung Chai.<br clear="all"><br>-- <br>FWIW: $\lnot \exists x \, {\rm Right} (x) \leftarrow \forall x \, {\rm Wrong} (x)$ \hfill -- Stephen Stills<br><br>Freedom's just another word for nothin' left to lose -- Kris Kristofferson<br>