Hi,

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?

Here is my code:
def moved (self, indexes):
    print "moved"

app = QApplication (sys.argv)
widget = QListWidget()
widget.setAcceptDrops (True)
widget.setDragEnabled (True)
widget.setDragDropMode (QAbstractItemView.InternalMove)
QObject.connect (widget, SIGNAL ("indexesMoved(QModelIndexList)"), moved)

QListWidgetItem ("item 1", widget)
QListWidgetItem ("item 2", widget)
QListWidgetItem ("item 3", widget)
QListWidgetItem ("item 4", widget)

widget.show()
app.exec_()

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.

Regards,
Fung Chai.

-- 
FWIW: $\lnot \exists x \, {\rm Right} (x) \leftarrow \forall x \, {\rm
Wrong} (x)$ \hfill -- Stephen Stills

Freedom's just another word for nothin' left to lose -- Kris Kristofferson
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to