1517 if obj is self and evt.type() == QEvent.ParentChange and \ |
1517 if obj is self and evt.type() == QEvent.ParentChange and \ |
1518 self.parentWidget() is not None: |
1518 self.parentWidget() is not None: |
1519 self.parentWidget().installEventFilter(self) |
1519 self.parentWidget().installEventFilter(self) |
1520 |
1520 |
1521 # find the render widget receiving events for the web page |
1521 # find the render widget receiving events for the web page |
1522 if qVersionTuple() < (5, 8, 0): |
1522 if qVersionTuple() < (5, 8, 0) or qVersionTuple() >= (5, 12, 0): |
1523 if obj is self and evt.type() == QEvent.ChildAdded: |
1523 if obj is self and evt.type() == QEvent.ChildAdded: |
1524 child = evt.child() |
1524 child = evt.child() |
1525 if child and child.inherits( |
1525 if child and child.inherits( |
1526 "QtWebEngineCore::" |
1526 "QtWebEngineCore::" |
1527 "RenderWidgetHostViewQtDelegateWidget"): |
1527 "RenderWidgetHostViewQtDelegateWidget"): |