Hello Everyone
I am using wt-3.1.9. I am making the calender application. I am facing some
problem
source code is:
#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WText>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
#include <Wt/WCheckBox>
#include <Wt/WAnchor>
#include <Wt/WImage>
#include <Wt/Dbo/backend/Sqlite3>
#include <Wt/WTemplate>
#include <Wt/WStackedWidget>
#include <Wt/WCssDecorationStyle>
#include <Wt/WCalendar>
using namespace Wt;
class HelloApplication : public WApplication
{
public:
HelloApplication(const WEnvironment& env);
private:
WLineEdit *name;
WLineEdit *password;
};
HelloApplication::HelloApplication(const WEnvironment& env)
: WApplication(env)
{
setTitle("Parvinder"); // application title
root()->addWidget(new WText("<h1>This is my officel website</h1>"));
root()->addWidget(new WBreak());
// WAnchor *x = new WAnchor("http://www.parvinder.co.in", "Jump to the
middle", root());
WAnchor *x = new Wt::WAnchor("http://www.parvinder.co.in", "parvinder",
root());
root()->addWidget(new WBreak());
Wt::WImage *img = new Wt::WImage("/images/pinder3.jpg", root());
img->setAlternateText("Parvinder");
root()->addWidget(new WBreak());
root()->addWidget(new WText("Name ")); // show some text
name = new WLineEdit(root()); // allow text input
name->setFocus();
root()->addWidget(new WText("password "));
password = new WLineEdit(root());
password->setEchoMode(WLineEdit::Password);
WPushButton *b = new WPushButton("login", root()); // create a button
b->setMargin(5, Left);
root()->addWidget(new WBreak());
root()->addWidget(new WText("<h1>Calender</h1>"));
Wt::WDate today = Wt::WDate::currentDate();
Wt::WCalendar *calendar = new Wt::WCalendar(root());
calendar->browseTo(today.addMonths(1));
calendar->select(today.addMonths(1).addDays(3));
calendar->selected().connect(root(), &addWidget::daySelected);
}
WApplication *createApplication(const WEnvironment& env)
{
return new HelloApplication(env);
}
int main(int argc, char **argv)
{
return WRun(argc, argv, &createApplication);
}
error is :
/home/witty/Desktop/website/source/hello.C: In constructor
‘HelloApplication::HelloApplication(const Wt::WEnvironment&)’:
/home/witty/Desktop/website/source/hello.C:65:40: error: ‘addWidget’ has not
been declared
make[2]: *** [source/CMakeFiles/hello.wt.dir/hello.C.o] Error 1
make[1]: *** [source/CMakeFiles/hello.wt.dir/all] Error 2
make: *** [all] Error 2
please help me
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest