173 self._keyboardModifiers = evt.modifiers() |
173 self._keyboardModifiers = evt.modifiers() |
174 act = obj.defaultAction() |
174 act = obj.defaultAction() |
175 idx = self.index(act) |
175 idx = self.index(act) |
176 if idx.isValid(): |
176 if idx.isValid(): |
177 self.activated[QModelIndex].emit(idx) |
177 self.activated[QModelIndex].emit(idx) |
178 elif evt.type() == QEvent.Type.MouseButtonPress: |
178 elif ( |
179 if evt.buttons() & Qt.MouseButton.LeftButton: |
179 evt.type() == QEvent.Type.MouseButtonPress and |
180 self.__dragStartPosition = self.mapFromGlobal(evt.globalPos()) |
180 evt.buttons() & Qt.MouseButton.LeftButton |
|
181 ): |
|
182 self.__dragStartPosition = self.mapFromGlobal(evt.globalPos()) |
181 |
183 |
182 return False |
184 return False |
183 |
185 |
184 def dragEnterEvent(self, evt): |
186 def dragEnterEvent(self, evt): |
185 """ |
187 """ |