qt_widgets 0.1.3

Bindings for Qt5Widgets library
1
2
3
4
5
6
7
8
9
10
11
12
13
use ::application::Application;
use ::qt_core::CoreApplicationArgs;

impl Application {
  pub fn create_and_exit<F: FnOnce(&mut Application) -> i32>(f: F) -> ! {
    let exit_code = {
      let mut args = CoreApplicationArgs::from_real();
      let mut app = Application::new(args.get());
      f(app.as_mut())
    };
    ::std::process::exit(exit_code)
  }
}