moninj: fix pyqt6 context menu exec

This commit is contained in:
Simon Renblad 2024-09-10 11:37:12 +08:00 committed by Sébastien Bourdeauducq
parent d8a3da449e
commit 38e0d6b953
1 changed files with 1 additions and 1 deletions

View File

@ -847,7 +847,7 @@ class _MonInjDock(QDockWidgetCloseDetect):
delete_action = QtGui.QAction("Delete widget", menu) delete_action = QtGui.QAction("Delete widget", menu)
delete_action.triggered.connect(partial(self.delete_widget, index)) delete_action.triggered.connect(partial(self.delete_widget, index))
menu.addAction(delete_action) menu.addAction(delete_action)
menu.exec_(self.flow.mapToGlobal(pos)) menu.exec(self.flow.mapToGlobal(pos))
def delete_all_widgets(self): def delete_all_widgets(self):
for index in reversed(range(self.flow.count())): for index in reversed(range(self.flow.count())):