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

Method LoadString

qml.go:170–172  ·  view source on GitHub ↗

LoadString loads a component from the provided QML string. The location informs the resource name for logged messages, and its path is used to locate any other resources referenced by the QML content. Once a component is loaded, component instances may be created from the resulting object via its C

(location, qml string)

Source from the content-addressed store, hash-verified

168// Once a component is loaded, component instances may be created from
169// the resulting object via its Create and CreateWindow methods.
170func (e *Engine) LoadString(location, qml string) (Object, error) {
171 return e.Load(location, strings.NewReader(qml))
172}
173
174// Context returns the engine's root context.
175func (e *Engine) Context() *Context {

Callers 7

runFunction · 0.95
TestContextSetVarsMethod · 0.80
TestContextSpawnMethod · 0.80
TestIssue84Method · 0.80
TestTableMethod · 0.80

Calls 1

LoadMethod · 0.95

Tested by 6

TestContextSetVarsMethod · 0.64
TestContextSpawnMethod · 0.64
TestIssue84Method · 0.64
TestTableMethod · 0.64