PythonQt.QtCore.QSignalBlocker
QSignalBlocker
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
QSignalBlocker can be used wherever you would otherwise use a pair of calls to blockSignals(). It blocks signals in its constructor and in the destructor it resets the state to what it was before the constructor ran.
{
const QSignalBlocker blocker(someQObject);
// no signals here
}
is thus equivalent to
const bool wasBlocked = someQObject->blockSignals(true);
// no signals here
someQObject->blockSignals(wasBlocked);
except the code using QSignalBlocker is safe in the face of exceptions.
Source: https://doc.qt.io/archives/qt-5.15/qsignalblocker.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
reblock |
function | (self) -> None |
Re-blocks signals after a previous [unblock](https://doc.qt.io/archives/qt-5.15/qsignalblocker.html#unblock)(). |
unblock |
function | (self) -> None |
Temporarily restores the [QObject::signalsBlocked](https://doc.qt.io/archives/qt-5.15/qobject.html#signalsBlocked)() state to what it was before this… |