Skip to content

Qt 5.4 panic: unsupported variant type: 1024 (QJSValue) #137

Open
@obscuren

Description

@obscuren

Using QT 5.4.0 with qml v1 and exporting the following object:

type MyObject struct {}
func (m *MyObject) Call(m map[string]interface{}) {
    fmt.Println(m)
}
context.SetVar("m", &MyObject{})
// m.call( {} );

Will result in: panic: unsupported variant type: 1024 (QJSValue)

Possible solution
On https://github.com/go-qml/qml/blob/v1/cpp/capi.cpp#L725 add a case QMetaType::User:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions