Macro qmetaobject::qt_method [−][src]
macro_rules! qt_method { ($($t:tt)*) => { ... }; }
This macro can be used to declare a method which will become a meta method.
Inside you can either declare the method signature, or write the full method.
Can be used within a struct that derives from QObject or QGadget
#[derive(QObject)] struct Foo { base: qt_base_class!(trait QObject), defined_method: qt_method!(fn defined_method(&self, foo: u32) -> u32 { println!("contents goes here."); return 42; }), out_of_line_method: qt_method!(fn(&self, foo: u32)-> u32), } impl Foo { fn out_of_line_method(&mut self, foo: u32) -> u32 { println!("Or here."); return 69; } }