| 60 UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs *args) { |
60 UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs *args) { |
| 61 UiContainerPrivate *ctn = ui_obj_container(obj); |
61 UiContainerPrivate *ctn = ui_obj_container(obj); |
| 62 UI_APPLY_LAYOUT(ctn->layout, args); |
62 UI_APPLY_LAYOUT(ctn->layout, args); |
| 63 |
63 |
| 64 QTextEdit *textarea = new QTextEdit(); |
64 QTextEdit *textarea = new QTextEdit(); |
| 65 ctn->add(textarea, true); |
65 ctn->add(textarea); |
| 66 |
66 |
| 67 QTextDocument *document = nullptr; |
67 QTextDocument *document = nullptr; |
| 68 |
68 |
| 69 UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_STRING); |
69 UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_STRING); |
| 70 if(var) { |
70 if(var) { |
| 213 static UIWIDGET create_textfield(UiObject *obj, UiTextFieldArgs *args, bool password, bool frameless) { |
213 static UIWIDGET create_textfield(UiObject *obj, UiTextFieldArgs *args, bool password, bool frameless) { |
| 214 UiContainerPrivate *ctn = ui_obj_container(obj); |
214 UiContainerPrivate *ctn = ui_obj_container(obj); |
| 215 UI_APPLY_LAYOUT(ctn->layout, args); |
215 UI_APPLY_LAYOUT(ctn->layout, args); |
| 216 |
216 |
| 217 QLineEdit *textfield = new QLineEdit(); |
217 QLineEdit *textfield = new QLineEdit(); |
| 218 ctn->add(textfield, false); |
218 ctn->add(textfield); |
| 219 |
219 |
| 220 if(password) { |
220 if(password) { |
| 221 textfield->setEchoMode(QLineEdit::Password); |
221 textfield->setEchoMode(QLineEdit::Password); |
| 222 } |
222 } |
| 223 |
223 |