def METHOD_NAME(self, event: QContextMenuEvent) -> None:
    index = self.indexAt(event.pos())
    if not index.isValid():
        return
    if not self.transfer_model.transfer_at_index(index).player:
        return
    menu = QMenu("Menu")
    delete_action = QAction("Cancel")
    delete_action.triggered.connect(lambda: self.cancel_transfer(index))
    menu.addAction(delete_action)
    menu.exec_(event.globalPos())