run_simple_app

Macro run_simple_app 

Source
macro_rules! run_simple_app {
    ($path:expr) => { ... };
}
Expand description

Runs a minimal application from an embedded QML file.

This macro is a convenience helper for small applications and examples. It embeds the given QML file at compile time using include_bytes!, creates a QApp instance, loads the QML source, and starts the Qt event loop.

The macro is intended to be used directly in main and requires no additional setup beyond a valid QML file.

§Parameters

  • $path – Path to a QML file, relative to the source file.

§Example

fn main() {
    run_simple_app!("qml/main.qml");
}

§Notes

  • The QML file is embedded into the binary at compile time.
  • This macro does not provide access to the QApp instance and is therefore best suited for simple applications.
  • For more advanced use cases, create and configure a QApp manually.