⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (792 Bytes)
Bug #8698
ยป main_spinbox.cpp
Minimal example code -
Georg Wenig
, 06/15/2021 04:09 PM
#include
<Wt/WApplication.h>
#include
<Wt/WBreak.h>
#include
<Wt/WDoubleSpinBox.h>
#include
<Wt/WSpinBox.h>
#include
<Wt/WContainerWidget.h>
#include
<memory>
class
MY_APPLICATION
:
public
Wt
::
WApplication
{
public:
explicit
MY_APPLICATION
(
const
Wt
::
WEnvironment
&
i_enviromment
)
:
WApplication
(
i_enviromment
)
{
auto
spin_box
=
root
()
->
addWidget
(
std
::
make_unique
<
Wt
::
WSpinBox
>
());
root
()
->
addWidget
(
std
::
make_unique
<
Wt
::
WBreak
>
());
auto
double_spin_box
=
root
()
->
addWidget
(
std
::
make_unique
<
Wt
::
WDoubleSpinBox
>
());
spin_box
->
setSuffix
(
"%"
);
double_spin_box
->
setSuffix
(
"%"
);
}
};
int
main
(
int
i_argc
,
char
**
i_argv
)
{
return
Wt
::
WRun
(
i_argc
,
i_argv
,
[](
const
Wt
::
WEnvironment
&
env
)
{
return
std
::
make_unique
<
MY_APPLICATION
>
(
env
);
});
}
(1-1/1)
Loading...