ui/qt/button.cpp

changeset 109
c3dfcb8f0be7
parent 108
77254bd6dccb
child 112
c3f2f16fa4b8
--- a/ui/qt/button.cpp	Sun Jul 20 22:04:39 2025 +0200
+++ b/ui/qt/button.cpp	Sun Aug 24 15:24:16 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