-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Qt 5.4 panic: unsupported variant type: 1024 (QJSValue) #137
Comments
After doing some testing the above possible solution didn't turn out to work properly. I've updated it with the following (and will send a proper PR once fully tested) case QMetaType::User:
{
if (qvar->userType() == 1034)
{
auto var = qvar->value<QJSValue>().toVariant();
packDataValue(&var, value);
}
else
{
qDebug() << "user-type =" << qvar->userType() << " name =" << QVariant::typeToName(qvar->userType());
}
}
break; I've left the |
Created PR, see #140 |
I see this error when trying to pass a Javascript array to a function on an object exported from Go. |
The diff from the PR fixes it for me. |
Just to add, I've been seeing the same error, when passing a javascript array out from QML to a go function on Qt 5.4.2. Anyway, PR #140 also fixed it for me. |
Using QT 5.4.0 with qml v1 and exporting the following object:
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:
The text was updated successfully, but these errors were encountered: