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

Method Set

qml.go:497–507  ·  view source on GitHub ↗

Set changes the named object property to the given value.

(property string, value interface{})

Source from the content-addressed store, hash-verified

495
496// Set changes the named object property to the given value.
497func (obj *Common) Set(property string, value interface{}) {
498 cproperty := C.CString(property)
499 defer C.free(unsafe.Pointer(cproperty))
500 var cerr *C.error
501 RunMain(func() {
502 var dvalue C.DataValue
503 packDataValue(value, &dvalue, obj.engine, cppOwner)
504 cerr = C.objectSetProperty(obj.addr, cproperty, &dvalue)
505 })
506 cmust(cerr)
507}
508
509// Property returns the current value for a property of the object.
510// If the property type is known, type-specific methods such as Int

Callers

nothing calls this directly

Calls 3

RunMainFunction · 0.85
packDataValueFunction · 0.85
cmustFunction · 0.85

Tested by

no test coverage detected