ui/qt/button.cpp

changeset 68
bd9fb6476b80
parent 66
8d490d97aab8
child 110
36f1581b43e2
equal deleted inserted replaced
67:f72c4f01bf4a 68:bd9fb6476b80
30 #include "container.h" 30 #include "container.h"
31 #include "toolkit.h" 31 #include "toolkit.h"
32 32
33 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) { 33 UIWIDGET ui_button(UiObject *obj, char *label, ui_callback f, void *data) {
34 QString str = QString::fromUtf8(label); 34 QString str = QString::fromUtf8(label);
35 QPushButton *button = new QPushButton(label); 35 QPushButton *button = new QPushButton(str);
36 36
37 if(f) { 37 if(f) {
38 UiEventWrapper *event = new UiEventWrapper(obj, f, data); 38 UiEventWrapper *event = new UiEventWrapper(obj, f, data);
39 button->connect(button, SIGNAL(clicked()), event, SLOT(slot())); 39 button->connect(button, SIGNAL(clicked()), event, SLOT(slot()));
40 } 40 }

mercurial