⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (1.01 KB)
Bug #5838
ยป issue_5838.cpp
Roel Standaert, 08/08/2017 04:11 PM
#include
<Wt/WApplication>
#include
<Wt/WComboBox>
#include
<Wt/WContainerWidget>
#include
<Wt/WDialog>
#include
<Wt/WPushButton>
#include
<Wt/WServer>
#include
<Wt/WText>
int
main
(
int
argc
,
char
*
argv
[])
{
return
Wt
::
WRun
(
argc
,
argv
,
[](
const
Wt
::
WEnvironment
&
env
)
{
Wt
::
WApplication
*
app
=
new
Wt
::
WApplication
(
env
);
Wt
::
WPushButton
*
btn
=
new
Wt
::
WPushButton
(
"Open dialog"
,
app
->
root
());
btn
->
clicked
().
connect
(
std
::
bind
([
=
]{
Wt
::
WDialog
*
dialog
=
new
Wt
::
WDialog
(
"TEST"
);
dialog
->
setWidth
(
400
);
dialog
->
setHeight
(
480
);
Wt
::
WComboBox
*
scanner_list
=
new
Wt
::
WComboBox
;
// scanner_list->addItem("...");
Wt
::
WContainerWidget
*
concenter
=
new
Wt
::
WContainerWidget
;
concenter
->
setContentAlignment
(
Wt
::
AlignCenter
);
concenter
->
setPositionScheme
(
Wt
::
Absolute
);
concenter
->
addWidget
(
new
Wt
::
WText
(
"TESTDIALOG"
));
dialog
->
contents
()
->
addWidget
(
scanner_list
);
dialog
->
contents
()
->
addWidget
(
concenter
);
dialog
->
exec
();
}));
return
app
;
});
}
(1-1/1)
Loading...