Set focus proxy for AbstractTab

By default, the AbstractTab object got the focus, which means things
like key events passed to it didn't actually get passed through to the
web view, causing these tests to fail:

    tests/end2end/features/test_keyinput_bdd.py::test_forwarding_all_keys
    tests/end2end/features/test_keyinput_bdd.py::test_forwarding_special_keys

Now we make sure the real underlying WebView always gets the keyboard
focus.
This commit is contained in:
Florian Bruhin 2016-07-04 14:39:37 +02:00
parent 3c3043eeae
commit 5dfd8d68bf

View File

@ -427,6 +427,7 @@ class AbstractTab(QWidget):
self.search._widget = widget
widget.mouse_wheel_zoom.connect(self.zoom.on_mouse_wheel_zoom)
widget.setParent(self)
self.setFocusProxy(widget)
@property
def cur_url(self):