MCPcopy
hub / github.com/go-qml/qml / run

Function run

examples/qmlscene/qmlscene.go:20–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func run() error {
21 engine := qml.NewEngine()
22
23 engine.On("quit", func() { os.Exit(0) })
24
25 component, err := engine.LoadFile(os.Args[1])
26 if err != nil {
27 return err
28 }
29 window := component.CreateWindow(nil)
30 window.Show()
31 window.Wait()
32 return nil
33}

Callers

nothing calls this directly

Calls 5

LoadFileMethod · 0.95
ShowMethod · 0.80
WaitMethod · 0.80
OnMethod · 0.65
CreateWindowMethod · 0.65

Tested by

no test coverage detected