MCPcopy Create free account
hub / github.com/cztomczak/cefpython / FocusHandler

Class FocusHandler

examples/qt.py:339–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338
339class FocusHandler(object):
340 def __init__(self, cef_widget):
341 self.cef_widget = cef_widget
342
343 def OnTakeFocus(self, **_):
344 if cef.GetAppSetting("debug"):
345 print("[qt.py] FocusHandler.OnTakeFocus")
346
347 def OnSetFocus(self, **_):
348 if cef.GetAppSetting("debug"):
349 print("[qt.py] FocusHandler.OnSetFocus")
350
351 def OnGotFocus(self, browser, **_):
352 if cef.GetAppSetting("debug"):
353 print("[qt.py] FocusHandler.OnGotFocus")
354 self.cef_widget.setFocus()
355 # Temporary fix no. 1 for focus issues on Linux (Issue #284)
356 if LINUX:
357 browser.SetFocus(True)
358
359
360class NavigationBar(QFrame):

Callers 1

embedBrowserMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected