File: checkbox.cpp

package info (click to toggle)
tuiwidgets 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,852 kB
  • sloc: cpp: 70,959; python: 655; sh: 39; makefile: 24
file content (13 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <Tui/ZCheckBox.h>
#include <Tui/ZHBoxLayout.h>
#include <Tui/ZWidget.h>

void exampleCheckBox(Tui::ZWidget *dialog, Tui::ZHBoxLayout *layout) {
// snippet-start
    Tui::ZCheckBox *checkbox = new Tui::ZCheckBox(Tui::withMarkup, "C<m>h</m>eckbox", dialog);
    layout->addWidget(checkbox);

    QObject::connect(checkbox, &Tui::ZCheckBox::stateChanged, [](Qt::CheckState state) { /* ... */ });
// snippet-end
}