Exemple #1
0
WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new WApplication(env);

  new WText("Name: ", app->root());
  WInPlaceEdit *edit = new WInPlaceEdit(L"Bob Smith", app->root());
  edit->setStyleClass(L"inplace");

  app->styleSheet().addRule("*.inplace span:hover", L"background-color: gray");

  return app;
}
Exemple #2
0
WWidget *FormWidgets::wInPlaceEdit()
{
  WContainerWidget *result = new WContainerWidget();

  topic("WInPlaceEdit", result);
  addText(tr("formwidgets-WInPlaceEdit"), result);
  addText("Try it here: ", result);
  WInPlaceEdit *ipe = new WInPlaceEdit("This is editable text", result);
  ipe->setStyleClass("in-place-edit");
  ed_->showSignal(ipe->valueChanged(), "In-place edit changed: ");

  return result;
}