pythonqtside._app_cleanup · declarations 001
Back to pythonqtside._app_cleanup
cleanup
cleanup(objects: list[Any], connections: list[tuple]) -> tuple[tuple[str, ...], list[Any]]
connection_call
connection_call(receiver: Any, name: str, value: Any, records: list[tuple], owner: Any = None, signal_name: str | None = None) -> Callable
Track successful native connects and mirror explicit disconnects.
Records are (signal, args, kwargs, undo, owner); undo disconnects an
overload-specific connection made through owner.connect(signature, ...);
owner is the signal's QObject when the call site named it.
disconnect_connections
disconnect_connections(connections: list[tuple]) -> tuple[str, ...]
Disconnect tracked callbacks independently of owned native object deletion.
native_slot
native_slot(value: Any) -> bool
A bound native Qt slot, such as dialog.reject (measured type name).
overload_signature
overload_signature(signal: Any, name: str, callback: Any) -> str | None
"2finished(int,QProcess::ExitStatus)" when the callback needs more
arguments than PythonQt's default (first declared) overload delivers.
PythonQt connects process.finished to the deprecated finished(int), so a
PySide2 lambda code, status: ... never runs (pqs-g04/fixtures).
same
same(left: Any, right: Any) -> bool
Equality that never lets PythonQt compare a native slot with another type.
PythonQt's slot comparison casts both operands to slot objects; comparing a native slot with a bound method of the same object segfaults FontLab (pqs-g04/fixtures/crash2-disconnect.md).
slot_forwarder
slot_forwarder(slot: Any) -> Callable
Connect a native slot through a Python function.
PythonQt passes every signal argument to a native slot, so
clicked.connect(label.clear) fails with "wrong number of arguments"; Qt
drops trailing arguments the slot does not take. The forwarder retries with
fewer leading arguments and remembers the count that worked. Holding only
Python functions in PythonQt's handler list also keeps its disconnect
comparison away from native slots.