Qt Buttons/zh: Difference between revisions
No edit summary |
AutoSpider (talk | contribs) (Add "cleanup" tag) |
||
Line 1: | Line 1: | ||
{{Cleanup | reason=Auto-imported from ExpressionEngine.}} | |||
[[Category:Developing_with_Qt::General]] | [[Category:Developing_with_Qt::General]] | ||
Revision as of 16:43, 3 March 2015
This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine. Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean. |
[toc align_right="yes" depth="3"]
简体中文 English Български Spanish
Qt中的按钮
概览
作为一个高级的GUI创建框架,Qt提供了丰富多样的按钮以满足不同的需求。Qt中的这些类继承自 "QAbstractButton":http://doc.qt.nokia.com/4.7/qabstractbutton.html ,并且实现了不同类型的按钮。QAbstractButton继承自 "QWidget":http://doc.qt.nokia.com/4.7/qwidget.html ,它是按钮部件类的抽象基类。
信号
QAbstractButton提供下列信号:
- void clicked ( bool checked = false )
- void pressed ()
- void released ()
- void toggled ( bool checked )
按钮的类型
QPushButton
"QPushButton":http://doc.qt.nokia.com/4.7/qpushbutton.html 是一个用于命令按钮的可定制部件。阅读 "怎样使用QPushButton":http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton 系列文章,以了解更多的关于这方面的信息和例子。
QCheckBox
"QCheckBox":http://doc.qt.nokia.com/4.7/qcheckbox.html 是一个看上去像是旁边有一个文本标签的复选框按钮。
QRadioButton
"QRadioButton":http://doc.qt.nokia.com/4.7/qradiobutton.html 是一个带有一个文本标签的单选按钮。
QToolButton
"QToolButton":http://doc.qt.nokia.com/4.7/qtoolbutton.html 提供了一个“快速-获取”的按钮组合,它们通常被用于一个 "QToolBar":http://doc.qt.nokia.com/4.7/qtoolbar.html之中。
参见
"Basic Qt Programming Tutorial":http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial "How to Use QPushButton":http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton