Hello!
Help me please what's going on:
i want to have auto-scroll in my QListWidget during drag-n-drop operation, so when the dragged item is at the bottom or at the top of viewport, the listwidget should scroll. Everything is ok by default - setAutoScroll(True), setAcceptDrops(True), etc.
When i add my code: (anything unusual, just for me)
the autoscroll disappears. Why? Should i write my own auto-scroll, catch the point at the top and so on? I want to code less)Code:
def startDrag(self): items = self.selectedItems() if bool(items): icon = items[0].icon() mimeData.setData("application/x-text", data) drag.setMimeData(mimeData) pixmap = icon.pixmap(24,24) drag.setPixmap(pixmap) drag.exec_(Qt.MoveAction) def mouseMoveEvent(self, ev): self.startDrag()
So, what's the reason?