StupidBeauty
Read times:276Posted at:Wed May 4 22:43:35 2011
- no title specified

Wt3.1.9文档翻译:WGroupBox类参考,WGroupBox Class Reference

这是一个将一些部件放在一个带标题的框里组合起来的部件

通常用于在一个表单里将某些表单元素组合起来

使用示例

 enum Vote { Republican = 1, Democrate = 2, NoVote = 10 };

 //使用一个分组框来作为3 个单选按钮的部件容器,带有一个标题

Wt::WGroupBox *container = new Wt::WGroupBox("USA elections vote");

 //使用一个按钮分组来将3 个选项在逻辑上组合起来

Wt::WButtonGroup *group = new Wt::WButtonGroup(this);

Wt::WRadioButton *button;

 button = new Wt::WRadioButton("I voted Republican", container);

 new Wt::WBreak(container);

 group->addButton(button, Republican);

 button = new Wt::WRadioButton("I voted Democrat", container);

 new Wt::WBreak(container);

 group->addButton(button, Democrate);

 button = new Wt::WRadioButton("I didn't vote", container);

 new Wt::WBreak(container);

 group->addButton(button, NoVote);

 group->setCheckedButton(group->button(NoVote));

就像WContainerWidget 一样WGroupBox默认是以一个块元素显示的

WGroupBox示例

CSS

这个部件对应于HTML <fieldset>标记,标题是处于一个嵌套的 <legend> 标记中 。这个部件不提供样式设置功能,但是可以使用内联或者外部的CSS 来进行样式处理

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4