Definition at line 18 of file hello.C.
◆ HelloApplication()
HelloApplication::HelloApplication |
( |
const Wt::WEnvironment & | env | ) |
|
Definition at line 36 of file hello.C.
37 : WApplication(env)
38{
39 setTitle("Hello world");
40
41 root()->addWidget(std::make_unique<Wt::WText>("Your name, please ? "));
42
43 nameEdit_ = root()->addWidget(std::make_unique<Wt::WLineEdit>());
45
46 auto button = root()->addWidget(std::make_unique<Wt::WPushButton>("Greet me."));
47
48 button->setMargin(5, Wt::Side::Left);
49
50 root()->addWidget(std::make_unique<Wt::WBreak>());
51 greeting_ = root()->addWidget(std::make_unique<Wt::WText>());
52
53
54
55
56
57
59
60
61
62
63
65
66
67
68
69 button->clicked().connect([=]() {
70 std::cerr <<
"Hello there, " <<
nameEdit_->text() << std::endl;
71 });
72}
Wt::WLineEdit * nameEdit_
◆ greet()
void HelloApplication::greet |
( |
| ) |
|
|
private |
◆ greeting_
Wt::WText* HelloApplication::greeting_ |
|
private |
◆ nameEdit_
Wt::WLineEdit* HelloApplication::nameEdit_ |
|
private |
The documentation for this class was generated from the following file: