Exclude QMenu when trying to find the missing focusProxy
This commit is contained in:
parent
1531961aeb
commit
9725d9ce33
@ -72,7 +72,13 @@ class WebEngineView(QWebEngineView):
|
|||||||
if proxy is not None:
|
if proxy is not None:
|
||||||
return proxy
|
return proxy
|
||||||
|
|
||||||
children = self.findChildren(QWidget)
|
# We only want the RenderWidgetHostViewQtDelegateWidget
|
||||||
|
# (which is a QWidget) but not e.g. a QMenu.
|
||||||
|
# pylint: disable=unidiomatic-typecheck
|
||||||
|
children = [child for child in self.findChildren(QWidget)
|
||||||
|
if type(child) == QWidget]
|
||||||
|
# pylint: enable=unidiomatic-typecheck
|
||||||
|
|
||||||
if not children:
|
if not children:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user