[][src]Macro uniui_base::widgets::prelude::u_textedit

macro_rules! u_textedit {
    (placeholder: $w:expr, $($param_name:ident: $val:expr),*$(,)*) => { ... };
}

Simplifies TextEdit creation

Parameters:

  • placeholder (required): String,
  • slot_set_text (optional): provided Signal<String> will be connected to [TextEdit::slot_set_text],
  • slot_set_text_proxy (optional): [TextEdit::slot_set_text]'s proxy will be assigned to provided identifier,
  • signal_text_changed (optional): [TextEdit::signal_text_changed] will be connected to provided Slot<String>.

Example:

let proxyslot_set_text;

let label = u_textedit! {
    placeholder: "First Name".to_owned(),
    slot_set_text_proxy: proxyslot_set_text,
};

// ...

// Changes TextEdit's text to "John"
proxyslot_set_text.exec_for("John".to_owned())