314 index = self.indexAt(coord) |
314 index = self.indexAt(coord) |
315 |
315 |
316 if index.isValid(): |
316 if index.isValid(): |
317 self.setCurrentIndex(index) |
317 self.setCurrentIndex(index) |
318 flags = QItemSelectionModel.SelectionFlags( |
318 flags = QItemSelectionModel.SelectionFlags( |
319 QItemSelectionModel.ClearAndSelect | |
319 QItemSelectionModel.ClearAndSelect | |
320 QItemSelectionModel.Rows) |
320 QItemSelectionModel.Rows) |
321 self.selectionModel().select(index, flags) |
321 self.selectionModel().select(index, flags) |
322 |
322 |
323 itm = self.model().item(index) |
323 itm = self.model().item(index) |
324 coord = self.mapToGlobal(coord) |
324 coord = self.mapToGlobal(coord) |