Avoid log spam on new QWebEngineView children

With Qt 6.9, Qt creates QObjects for accessibility
tree nodes, which result in a lot of log spam.

Fixes #8542
This commit is contained in:
Florian Bruhin 2025-05-19 15:59:49 +02:00
parent c86ddd11be
commit 856aeb3f47
1 changed files with 2 additions and 2 deletions

View File

@ -38,8 +38,8 @@ class ChildEventFilter(QObject):
if event.type() == QEvent.Type.ChildAdded: if event.type() == QEvent.Type.ChildAdded:
child = event.child() child = event.child()
if not isinstance(child, QWidget): if not isinstance(child, QWidget):
# Can e.g. happen when dragging text # Can e.g. happen when dragging text, or accessibility tree
log.misc.debug(f"Ignoring new child {qtutils.qobj_repr(child)}") # nodes since Qt 6.9
return False return False
log.misc.debug( log.misc.debug(