#include #include namespace { class TestTemplate : public Wt::WApplication { public: TestTemplate( const Wt::WEnvironment& env ) : Wt::WApplication( env ) { auto t = new Wt::WTemplate; String templateText = R"(
)"; t->setTemplateText( templateText, Wt::XHTMLUnsafeText ); root()->addWidget( t ); auto w = new Wt::WContainerWidget; w->mouseWentDown().connect( [](...){ Wt::WMessageBox::show( "xx", "xx", Wt::Ok ); } ); w->mouseWentUp().connect( [](...){ } ); w->resize( 500, 500 ); w->decorationStyle().setBackgroundColor( Wt::lightGray ); root()->addWidget( w ); } }; }