def _stop(self): """ Stop receiving messages from Qt, restoring the previously installed handler. """ if qt_api.qInstallMsgHandler: qt_api.qInstallMsgHandler(self._previous_handler) else: assert qt_api.qInstallMessageHandler qt_api.qInstallMessageHandler(self._previous_handler)
def _start(self): """ Start receiving messages from Qt. """ previous_handler = qt_api.qInstallMessageHandler( self._handle_with_context) self._previous_handler = previous_handler
def _start(self): """ Start receiving messages from Qt. """ if qt_api.qInstallMsgHandler: previous_handler = qt_api.qInstallMsgHandler(self._handle_no_context) else: assert qt_api.qInstallMessageHandler previous_handler = qt_api.qInstallMessageHandler(self._handle_with_context) self._previous_handler = previous_handler
def _stop(self): """ Stop receiving messages from Qt, restoring the previously installed handler. """ qt_api.qInstallMessageHandler(self._previous_handler)