Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qt Buttons/zh: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
AutoSpider (talk | contribs) (Simplify punctuation) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Cleanup | reason=Auto-imported from ExpressionEngine.}} | |||
[[Category:Developing_with_Qt::General]] | [[Category:Developing_with_Qt::General]] | ||
'''简体中文''' [[Qt_Buttons|English]] [[Qt_Buttons_Bulgarian|Български]] [[Qt_Buttons_Spanish|Spanish]] | '''简体中文''' [[Qt_Buttons|English]] [[Qt_Buttons_Bulgarian|Български]] [[Qt_Buttons_Spanish|Spanish]] | ||
Line 9: | Line 10: | ||
== 概览 == | == 概览 == | ||
作为一个高级的GUI创建框架,Qt提供了丰富多样的按钮以满足不同的需求。Qt中的这些类继承自 | 作为一个高级的GUI创建框架,Qt提供了丰富多样的按钮以满足不同的需求。Qt中的这些类继承自 [http://doc.qt.nokia.com/4.7/qabstractbutton.html QAbstractButton] ,并且实现了不同类型的按钮。QAbstractButton继承自 [http://doc.qt.nokia.com/4.7/qwidget.html QWidget] ,它是按钮部件类的抽象基类。 | ||
== 信号 == | == 信号 == | ||
Line 24: | Line 25: | ||
=== QPushButton === | === QPushButton === | ||
[http://doc.qt.nokia.com/4.7/qpushbutton.html QPushButton] 是一个用于命令按钮的可定制部件。阅读 [http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton 怎样使用QPushButton] 系列文章,以了解更多的关于这方面的信息和例子。 | |||
[[Image:http://doc.qt.nokia.com/4.7/images/windowsxp-pushbutton.png|push button]] | [[Image:http://doc.qt.nokia.com/4.7/images/windowsxp-pushbutton.png|push button]] | ||
Line 30: | Line 31: | ||
=== QCheckBox === | === QCheckBox === | ||
[http://doc.qt.nokia.com/4.7/qcheckbox.html QCheckBox] 是一个看上去像是旁边有一个文本标签的复选框按钮。 | |||
[[Image:http://doc.qt.nokia.com/4.7/images/windows-checkbox.png|checkbox]] | [[Image:http://doc.qt.nokia.com/4.7/images/windows-checkbox.png|checkbox]] | ||
Line 36: | Line 37: | ||
=== QRadioButton === | === QRadioButton === | ||
[http://doc.qt.nokia.com/4.7/qradiobutton.html QRadioButton] 是一个带有一个文本标签的单选按钮。 | |||
[[Image:http://doc.qt.nokia.com/4.7/images/windows-radiobutton.png|radio button]] | [[Image:http://doc.qt.nokia.com/4.7/images/windows-radiobutton.png|radio button]] | ||
Line 42: | Line 43: | ||
=== QToolButton === | === QToolButton === | ||
[http://doc.qt.nokia.com/4.7/qtoolbutton.html QToolButton] 提供了一个"快速-获取"的按钮组合,它们通常被用于一个 [http://doc.qt.nokia.com/4.7/qtoolbar.html之中。 QToolBar] | |||
[[Image:http://doc.qt.nokia.com/4.7/images/assistant-toolbar.png|button inside toolbar]] | [[Image:http://doc.qt.nokia.com/4.7/images/assistant-toolbar.png|button inside toolbar]] | ||
Line 48: | Line 49: | ||
== 参见 == | == 参见 == | ||
[http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial Basic Qt Programming Tutorial] | |||
[http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton How to Use QPushButton] |
Latest revision as of 13:23, 23 August 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. |
简体中文 English Български Spanish
Qt中的按钮
概览
作为一个高级的GUI创建框架,Qt提供了丰富多样的按钮以满足不同的需求。Qt中的这些类继承自 QAbstractButton ,并且实现了不同类型的按钮。QAbstractButton继承自 QWidget ,它是按钮部件类的抽象基类。
信号
QAbstractButton提供下列信号:
- void clicked ( bool checked = false )
- void pressed ()
- void released ()
- void toggled ( bool checked )
按钮的类型
QPushButton
QPushButton 是一个用于命令按钮的可定制部件。阅读 怎样使用QPushButton 系列文章,以了解更多的关于这方面的信息和例子。
QCheckBox
QCheckBox 是一个看上去像是旁边有一个文本标签的复选框按钮。
QRadioButton
QRadioButton 是一个带有一个文本标签的单选按钮。
QToolButton
QToolButton 提供了一个"快速-获取"的按钮组合,它们通常被用于一个 QToolBar