You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing around, trying to get Rust plugins recognized by Qt Designer Studio, but failing miserably.
After some investigation, I have tracked it down to this:
It seems that the generated metadata is incomplete.
Test case:
Simple cdylib crate, lib.rs with:
use std::ffi::CStr;use cstr::cstr;use qmetaobject::*;#[derive(Default,QObject)]structQTTest{base:qt_base_class!(traitQObject),}#[derive(Default,QObject)]structQExampleQmlPlugin{base:qt_base_class!(traitQQmlExtensionPlugin),plugin:qt_plugin!("org.qt-project.Qt.QQmlExtensionInterface/1.0"),}implQQmlExtensionPluginforQExampleQmlPlugin{fnregister_types(&mutself,uri:&CStr){assert_eq!(uri,cstr!("XFlow"));qml_register_type::<QTTest>(uri,1,0,cstr!("XFlow"));}}
Running
cd target/debug
QT_PLUGIN_PATH=`pwd` qtplugininfo ./lib<whatever>.so
results in
IID "org.qt-project.Qt.QQmlExtensionInterface/1.0" Qt 5.1.0 (debug)
qtplugininfo: ./libxflow_gui.so: invalid metadata, user data is not a JSON object
And running
cd target/debug
QT_PLUGIN_PATH=`pwd` qmlplugindump -v XFlow 1.0 ./libxflow_gui.so
fails outright with
QQmlComponent: Component is not ready
The text was updated successfully, but these errors were encountered:
I've been playing around, trying to get Rust plugins recognized by Qt Designer Studio, but failing miserably.
After some investigation, I have tracked it down to this:
It seems that the generated metadata is incomplete.
Test case:
Running
results in
And running
fails outright with
The text was updated successfully, but these errors were encountered: