# HG changeset patch # User Olaf Wintermann # Date 1755850975 -7200 # Node ID 4ee6a23bdcbfd35ed1d48db90d756555b8e209f0 # Parent 71d62990b016a73398d5f8ea21c64f7f1611fb2d implement ui_button_set_label (QT) diff -r 71d62990b016 -r 4ee6a23bdcbf .hgignore --- a/.hgignore Fri Aug 22 10:19:24 2025 +0200 +++ b/.hgignore Fri Aug 22 10:22:55 2025 +0200 @@ -8,6 +8,6 @@ relre:^make/xcode/toolkit/toolkit.xcodeproj/xcuserdata/.* relre:^make/xcode/toolkit/toolkit.xcodeproj/project.xcworkspace/xcuserdata/.* relre:^ui/winui/Generated Files/.* -relre:^.qmake.stash$ +relre:.qmake.stash$ relre:^.idea/.* relre:^compile_commands.json$ diff -r 71d62990b016 -r 4ee6a23bdcbf ui/qt/button.cpp --- 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();