ui/qt/label.cpp

changeset 516
4b31c74666d7
parent 70
3d801e8dda3a
child 521
6e3e1fa6dfcc
equal deleted inserted replaced
515:9e18cb8c4412 516:4b31c74666d7
28 28
29 #include "label.h" 29 #include "label.h"
30 #include "container.h" 30 #include "container.h"
31 #include "toolkit.h" 31 #include "toolkit.h"
32 32
33 UIWIDGET ui_label(UiObject *obj, char *label) {
34 QString str = QString::fromUtf8(label);
35 QLabel *widget = new QLabel(str);
36
37 UiContainer *ct = uic_get_current_container(obj);
38 ct->add(widget, false);
39
40 return widget;
41 }
42
43 UIWIDGET ui_space(UiObject *obj) {
44 // TODO: maybe there is a better widget for this purpose
45 QLabel *widget = new QLabel();
46
47 UiContainer *ct = uic_get_current_container(obj);
48 ct->add(widget, true);
49
50 return widget;
51 }

mercurial