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

Function main

examples/qt.py:91–112  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89
90
91def main():
92 check_versions()
93 sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error
94 settings = {}
95 if MAC:
96 # Issue #442 requires enabling message pump on Mac
97 # in Qt example. Calling cef.DoMessageLoopWork in a timer
98 # doesn't work anymore.
99 settings["external_message_pump"] = True
100
101 cef.Initialize(settings)
102 app = CefApplication(sys.argv)
103 main_window = MainWindow()
104 main_window.show()
105 main_window.activateWindow()
106 main_window.raise_()
107 app.exec_()
108 if not cef.GetAppSetting("external_message_pump"):
109 app.stopTimer()
110 del main_window # Just to be safe, similarly to "del app"
111 del app # Must destroy app object before calling Shutdown
112 cef.Shutdown()
113
114
115def check_versions():

Callers 1

qt.pyFile · 0.70

Calls 4

stopTimerMethod · 0.95
CefApplicationClass · 0.85
MainWindowClass · 0.85
check_versionsFunction · 0.70

Tested by

no test coverage detected