Project

General

Profile

Actions

Support #7521

closed

Example: Dialogs

Added by ZAITAO HUANG over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/21/2020
Due date:
% Done:

0%

Estimated time:


Files

example_wt.jpg (192 KB) example_wt.jpg Wt example, run result ZAITAO HUANG, 04/21/2020 10:00 AM
example_myself.jpg (40.5 KB) example_myself.jpg I fallow the example code, run result ZAITAO HUANG, 04/21/2020 10:00 AM
myself_ok.jpg (56.1 KB) myself_ok.jpg ZAITAO HUANG, 04/21/2020 11:49 AM
Actions #1

Updated by ZAITAO HUANG over 4 years ago

the dialog non-modal,

I had set modal,

dialog->setModal(true);

and dialog->exec();

Actions #2

Updated by ZAITAO HUANG over 4 years ago

the next example: Message box It's also the case.

WMessageBox, non-modal.

I use Edge and Chrome. Both browsers have the same result

Actions #3

Updated by Roel Standaert over 4 years ago

Hey, I think you're just missing the resources.

Use the --resources-dir=/path/to/wt/resources argument to indicate to your program where the resources are. Of course, replace /path/to/wt/resources with where the resources folder of Wt actually is.

Note: the widget gallery also uses the Bootstrap theme, so even if you use --resources-dir it won't look the same unless you actually enable to Bootstrap theme:

auto theme = std::make_shared<Wt::WBootstrapTheme>();
theme->setVersion(Wt::BootstrapVersion::v3);
app->setTheme(theme);
Actions #4

Updated by ZAITAO HUANG over 4 years ago

Roel Standaert. thank you.

I dont know how use the Bootstrap,

this is my first time to code web application.

I have leaned to use CSS and XML resource before,

now,I dont know how to config and use Bootstrap.

or, could you tell the link to Wt document on how to use?

Actions #5

Updated by ZAITAO HUANG over 4 years ago

I have added these code to the application,

auto theme = std::make_sharedWt::WBootstrapTheme();

theme->setVersion(Wt::BootstrapVersion::v3);

app->setTheme(theme);

but, still the case.

Actions #6

Updated by ZAITAO HUANG over 4 years ago

Roel Standaert. thank you.

I found the reason according to Example: \lib\Wt\examples\chart3D

Like you said, I have no path to configure resources

Actions #7

Updated by Roel Standaert over 4 years ago

  • Status changed from New to Closed

Glad to see you figured it out.

Actions #8

Updated by ZAITAO HUANG over 4 years ago

yeh. I'm so happy, thanks for your time.

God bless you. ///(v)\\\

Actions

Also available in: Atom PDF