ui/qt/button.cpp

changeset 703
4ee6a23bdcbf
parent 672
1b08ba076b65
child 802
cc73993a3ff9
--- a/ui/qt/button.cpp	Fri Aug 22 10:19:24 2025 +0200
+++ b/ui/qt/button.cpp	Fri Aug 22 10:22:55 2025 +0200
@@ -48,6 +48,16 @@
     return button;
 }
 
+void ui_button_set_label(UIWIDGET button, const char *label) {
+    QString str = QString::fromUtf8(label);
+    QAbstractButton *b = (QAbstractButton*)button;
+    b->setText(str);
+}
+
+void ui_button_set_icon(UIWIDGET button, const char *icon) {
+    // TODO
+}
+
 static void togglebutton_event(UiEvent *event, UiEventWrapper *wrapper) {
     QPushButton *button = (QPushButton*)wrapper->customdata1;
     event->intval = button->isChecked();

mercurial