#include <iostream>
#include <boost/lexical_cast.hpp>
#include <WApplication>
#include <WContainerWidget>
#include <WText>
#include <WEvent>
#include <WStandardItemModel>
#include <Ext/TableView>
#include <Ext/ToolBar>
#include <Ext/Button>
using namespace Wt;
class Test : public WApplication {
public:
Test(const WEnvironment& env);
};
Test::Test(const WEnvironment& env)
: WApplication(env) {
WContainerWidget *ex = new WContainerWidget(root());
ex->resize(WLength(800), WLength(500));
Ext::ToolBar *topToolBar = new Ext::ToolBar(ex);
Ext::ToolBar *topToolBarMore = new Ext::ToolBar(ex);
WText *query_more_show = new WText("↓");
topToolBar->add(query_more_show);
query_more_show->clicked.connect(SLOT(topToolBarMore, WWidget::show));
topToolBar->addSeparator();
WText *query_more_hide = new WText("↑");
topToolBar->add(query_more_hide);
query_more_hide->clicked.connect(SLOT(topToolBarMore, WWidget::hide));
topToolBarMore->addSeparator();
// if hide topToolBarMore first, the WWidget::show() slot will not work;
// if comment this clause, the show() and hide() will perform correctly.
topToolBarMore->hide();
}
WApplication *createApplication(const WEnvironment& env)
{
return new Test(env);
}
int main(int argc, char **argv)
{
return WRun(argc, argv, &createApplication);
}
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest