[][src]Trait qmetaobject::qtdeclarative::QQmlExtensionPlugin

pub trait QQmlExtensionPlugin: QObject {
    fn register_types(&mut self, uri: &CStr);
}

A QObject-like trait to inherit from QQmlExtensionPlugin.

Refer to the Qt documentation of QQmlExtensionPlugin

See also the 'qmlextensionplugins' example.

#[derive(Default, QObject)]
struct QExampleQmlPlugin {
    base: qt_base_class!(trait QQmlExtensionPlugin),
    plugin: qt_plugin!("org.qt-project.Qt.QQmlExtensionInterface/1.0"),
}

impl QQmlExtensionPlugin for QExampleQmlPlugin {
    fn register_types(&mut self, uri: &std::ffi::CStr) {
        // call `qml_register_type` here
    }
}

Required methods

fn register_types(&mut self, uri: &CStr)

Refer to the Qt documentation of QQmlExtensionPlugin::registerTypes

Loading content...

Implementors

Loading content...