[−]Struct qmetaobject::qtdeclarative::QmlEngine
Methods
impl QmlEngine
[src]
pub fn new() -> QmlEngine
[src]
create a new QmlEngine
pub fn load_file(&mut self, path: QString)
[src]
Loads a file as a qml file (See QQmlApplicationEngine::load(const QString & filePath))
pub fn load_data(&mut self, data: QByteArray)
[src]
Loads qml data (See QQmlApplicationEngine::loadData)
pub fn exec(&self)
[src]
Launches the application
pub fn quit(&self)
[src]
Closes the application
pub fn set_property(&mut self, name: QString, value: QVariant)
[src]
Sets a property for this QML context (calls QQmlEngine::rootContext()->setContextProperty)
pub fn set_object_property<T: QObject + Sized>(
&mut self,
name: QString,
obj: QObjectPinned<T>
)
[src]
&mut self,
name: QString,
obj: QObjectPinned<T>
)
Sets a property for this QML context (calls QQmlEngine::rootContext()->setContextProperty)
pub fn invoke_method(&mut self, name: QByteArray, args: &[QVariant]) -> QVariant
[src]
pub fn new_qobject<T: QObject>(&mut self, obj: T) -> QJSValue
[src]
Give a QObject to the engine by wraping it in a QJSValue
This will create the C++ object. Panic if the C++ object was already created.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,