File: button.cpp

package info (click to toggle)
tuiwidgets 0.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,940 kB
  • sloc: cpp: 54,583; python: 495; sh: 83; makefile: 8
file content (15 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <Tui/ZButton.h>
#include <Tui/ZHBoxLayout.h>
#include <Tui/ZWidget.h>

void exampleButton(Tui::ZWidget *dialog, Tui::ZHBoxLayout *layout) {
// snippet-start
    Tui::ZButton *button = new Tui::ZButton(Tui::withMarkup, "B<m>u</m>tton", dialog);
    layout->addWidget(button);

    QObject::connect(button, &Tui::ZButton::clicked, [] { /* ... */ });
// snippet-end
}

int main() {
}