当前位置: 首页>>代码示例>>C++>>正文


C++ WLineEdit::setTextSize方法代码示例

本文整理汇总了C++中WLineEdit::setTextSize方法的典型用法代码示例。如果您正苦于以下问题:C++ WLineEdit::setTextSize方法的具体用法?C++ WLineEdit::setTextSize怎么用?C++ WLineEdit::setTextSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WLineEdit的用法示例。


在下文中一共展示了WLineEdit::setTextSize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WBreak

WWidget *EventsDemo::wKeyEvent()
{
  WContainerWidget *result = new WContainerWidget();

  topic("WKeyEvent", result);
  addText(tr("events-WKeyEvent-1"), result);
  WLineEdit *l = new WLineEdit(result);
  l->setTextSize(50);
  l->keyWentUp().connect(this, &EventsDemo::showKeyWentUp);
  l->keyWentDown().connect(this, &EventsDemo::showKeyWentDown);
  
  addText(tr("events-WKeyEvent-2"), result);
  l = new WLineEdit(result);
  l->setTextSize(50);
  l->keyPressed().connect(this, &EventsDemo::showKeyPressed);
  
  addText(tr("events-WKeyEvent-3"), result);
  l = new WLineEdit(result);
  l->setTextSize(50);
  l->enterPressed().connect(this, &EventsDemo::showEnterPressed);
  l->escapePressed().connect(this, &EventsDemo::showEscapePressed);
  new WBreak(result);
  addText("Last event: ", result);
  keyEventType_ = new WText(result);
  new WBreak(result);
  keyEventDescription_ = new WText(result);

  return result;
}
开发者ID:913862627,项目名称:wt,代码行数:29,代码来源:EventsDemo.C

示例2: WSuggestionPopup

WWidget *FormWidgets::wSuggestionPopup()
{
  WContainerWidget *result = new WContainerWidget();

  topic("WSuggestionPopup", result);
  addText(tr("formwidgets-WSuggestionPopup"), result);

  // options for email address suggestions
  WSuggestionPopup::Options contactOptions;
  contactOptions.highlightBeginTag = "<span class=\"highlight\">";
  contactOptions.highlightEndTag = "</span>";
  contactOptions.listSeparator = ',';
  contactOptions.whitespace = " \\n";
  contactOptions.wordSeparators = "-., \"@\\n;";
  contactOptions.appendReplacedText = ", ";

  WSuggestionPopup *sp =
    new WSuggestionPopup(WSuggestionPopup::generateMatcherJS(contactOptions),
			 WSuggestionPopup::generateReplacerJS(contactOptions),
			 result);
  WLineEdit *le = new WLineEdit(result);
  le->setTextSize(50);
  le->setInline(false);
  sp->forEdit(le);
  sp->addSuggestion("John Tech <[email protected]>",
		    "John Tech <[email protected]>");
  sp->addSuggestion("Johnny Cash <[email protected]>", 
		    "Johnny Cash <[email protected]>");
  sp->addSuggestion("John Rambo <[email protected]>",
		    "John Rambo <[email protected]>");
  sp->addSuggestion("Johanna Tree <[email protected]>",
		    "Johanna Tree <[email protected]>");

  return result;
}
开发者ID:StevenFarley,项目名称:wt,代码行数:35,代码来源:FormWidgets.C


注:本文中的WLineEdit::setTextSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。