(self, event)
| 105 | event.ignore() |
| 106 | |
| 107 | def dropEvent(self, event): |
| 108 | for url in event.mimeData().urls(): |
| 109 | path = url.toLocalFile() |
| 110 | if os.path.isfile(path): |
| 111 | self.add_item(path) |
| 112 | elif os.path.isdir(path): |
| 113 | for root, _, files in os.walk(path): |
| 114 | for file in files: |
| 115 | if not file.startswith("."): |
| 116 | self.add_item(os.path.join(root, file)) |
| 117 | |
| 118 | |
| 119 | class ItemSelectionFrame(QtWidgets.QFrame): |