How to pass arguments to callback functions in PyQt

How to pass arguments to callback functions in PyQt

You can use functools.partial from standart Python library. Example with QAction:

some_action.triggered.connect(functools.partial(some_callback, param1, param2))

Leave a Comment