Project

General

Profile

Bug #3531 ยป problemCode.cpp

Alex V, 08/18/2014 12:54 PM

 
#include <Wt/WApplication>
#include <Wt/WAudio>
#include <Wt/WComboBox>

class App : public Wt::WApplication
{
public:
App(const Wt::WEnvironment& env) : Wt::WApplication(env)
{
Wt::WAudio *audio = new Wt::WAudio(root());
audio->setId("audio0");

Wt::WComboBox* cb = new Wt::WComboBox(root());
cb->addItem("1");
cb->addItem("2");
cb->addItem("3");
cb->setCurrentIndex(0);
cb->activated().connect(this, &App::appDoSomething);
}

void appDoSomething()
{
new Wt::WComboBox(Wt::WApplication::instance()->root());
}
};


Wt::WApplication* CreateApp(const Wt::WEnvironment& env)
{
return new App(env);
}


int main(int argc, char* argv[])
{
return Wt::WRun(argc, argv, CreateApp);
}
    (1-1/1)