Source code for schrodinger.Qt.PyQt6.QtCore
from PyQt6.QtCore import * # noqa: F401,F403
# PyQt6 no longer wraps qRegisterResourceData and qUnregisterResourceData (used
# for importing _rc.py files), so we've created our own wrappings for those two
# functions and we explicitly add them here.
from ._qresource import qRegisterResourceData # noqa: F401
from ._qresource import qUnregisterResourceData # noqa: F401
# allow enums to be accessed directly through the class (e.g.
# QComboBox.InsertAlphabetically instead of
# QComboBox.InsertPolicy.InsertAlphabetically)
from schrodinger.infra import fix_sip6_enum_access
fix_sip6_enum_access.modify_enum_access(globals(), __name__.split(".")[-1])
del fix_sip6_enum_access
[docs]class QSignalBlocker(QSignalBlocker):
[docs] def __init__(self, *args, **kwargs):
# BLDMGR-5994 QSignalBlocker can crash on Mac and
# RAII doesn't make sense in Python anyway
raise RuntimeError(
"Use QObject.blockSignals(True) or "
"schrodinger.utils.qt_utils.suppress_signals instead")