255 drag = QDrag(self) |
255 drag = QDrag(self) |
256 drag.setMimeData(self.__model.mimeData([idx])) |
256 drag.setMimeData(self.__model.mimeData([idx])) |
257 actionRect = self.actionGeometry(act) |
257 actionRect = self.actionGeometry(act) |
258 drag.setPixmap(self.grab(actionRect)) |
258 drag.setPixmap(self.grab(actionRect)) |
259 |
259 |
260 if drag.exec_() == Qt.MoveAction: |
260 if drag.exec() == Qt.MoveAction: |
261 row = idx.row() |
261 row = idx.row() |
262 if self.__dropIndex == idx.parent() and self.__dropRow <= row: |
262 if self.__dropIndex == idx.parent() and self.__dropRow <= row: |
263 row += 1 |
263 row += 1 |
264 self.__model.removeRow(row, self.__root) |
264 self.__model.removeRow(row, self.__root) |
265 |
265 |