safe_slot

tna.gui.gui_signals.safe_slot(func)[source]

Decorator for safe execution of Qt slots.

Catches all exceptions and displays them in a message box.

Parameters:

func (callable) – Function to be used as a Qt slot.

Returns:

Wrapped function with exception handling.

Return type:

callable