396 drag = QDrag(self) |
396 drag = QDrag(self) |
397 drag.setMimeData(self.__model.mimeData([idx])) |
397 drag.setMimeData(self.__model.mimeData([idx])) |
398 actionRect = self.actionGeometry(act) |
398 actionRect = self.actionGeometry(act) |
399 drag.setPixmap(self.grab(actionRect)) |
399 drag.setPixmap(self.grab(actionRect)) |
400 |
400 |
401 if drag.exec_() == Qt.MoveAction: |
401 if drag.exec() == Qt.MoveAction: |
402 row = idx.row() |
402 row = idx.row() |
403 if self.__dropIndex == idx.parent() and self.__dropRow <= row: |
403 if self.__dropIndex == idx.parent() and self.__dropRow <= row: |
404 row += 1 |
404 row += 1 |
405 self.__model.removeRow(row, self.__root) |
405 self.__model.removeRow(row, self.__root) |
406 |
406 |