Skip to content

Signal Utilities#

superqt.utils.signals_blocked(obj) #

Context manager to temporarily block signals emitted by QObject: obj.

Parameters:

Name Type Description Default
obj QObject

The QObject whose signals should be blocked.

required

Examples:

from qtpy.QtWidgets import QSpinBox
from superqt import signals_blocked

spinbox = QSpinBox()
with signals_blocked(spinbox):
    spinbox.setValue(10)