Project

General

Profile

Bug #7439 ยป test.cpp

Max Quatember, 02/04/2020 01:04 PM

 
namespace
{
class Tooltip
: public Wt::WText
{
public:
Tooltip()
: Wt::WText( "widget" )
{
setDeferredToolTip( true, Wt::TextFormat::XHTML);
}
virtual Wt::WString toolTip() const override
{
return "this is it";
}
};

class TestDiaDeferredToolTip
: public Wt::WApplication
{
public:
TestDiaDeferredToolTip( const Wt::WEnvironment& env )
: Wt::WApplication( env )
{
setCssTheme( "polished" );
auto x = root()->addNew< Tooltip >();
auto b = root()->addNew< Wt::WPushButton >( "open dia" );
b->clicked().connect( [=]
{
Wt::WDialog dia;
dia.setWindowTitle( "dia" );
dia.setClosable( true );
dia.contents()->addNew< Tooltip >();
dia.exec();
});
}
};
}

    (1-1/1)