whisker.debug_qt

whisker/debug_qt.py


Copyright © 2011-2020 Rudolf Cardinal (rudolf@pobox.com).

This file is part of the Whisker Python client library.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Functions to debug Qt objects and signals under PyQt5.

whisker.debug_qt.debug_object(obj: SimpleClass) None[source]

Writes a debug log message within information about the QObject.

whisker.debug_qt.debug_thread(thread: <MagicMock id='139817548898256'>) None[source]

Writes a debug log message about the QThread.

whisker.debug_qt.enable_signal_debugging(connect_call: Callable[[Any], None] | None = None, disconnect_call: Callable[[Any], None] | None = None, emit_call: Callable[[Any], None] | None = None) None[source]

Call this to enable PySide/Qt signal debugging. This will trap all connect() and disconnect() calls, calling the user-supplied functions first and then the real things.

whisker.debug_qt.enable_signal_debugging_simply() None[source]

Enables Qt signal debugging for connect() and emit() calls.

whisker.debug_qt.simple_connect_debugger(*args) None[source]

Function to report on connect() calls.

whisker.debug_qt.simple_emit_debugger(*args) None[source]

Function to report on emit() calls.