class TestTreeView : public Wt::WApplication { public: TestTreeView( const Wt::WEnvironment& env ) : Wt::WApplication( env ) { Wt::WTreeView* treeView = new Wt::WTreeView( root() ); treeView->resize( 500, 500 ); Wt::WStandardItemModel* model = new Wt::WStandardItemModel( 0, 1 ); model->setHeaderData( 0, Wt::Horizontal, std::string( "xxxxxxx" ) ); for( auto i = 0; i < 500; i++ ) model->appendRow( { new Wt::WStandardItem( std::to_string( i ) ) } ); treeView->setModel( model ); treeView->setSelectionMode( Wt::SelectionMode::SingleSelection ); treeView->doubleClicked().connect( []( ... ) { Wt::WMessageBox::show( "Popup", "Popup", Wt::Ok ); } ); } };