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
AutoSpider (talk | contribs) (Convert ExpressionEngine links) |
AutoSpider (talk | contribs) m (AutoSpider moved page Qt Buttons SimplifiedChinese to Qt Buttons/zh: Localisation) |
Revision as of 16:02, 16 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 ,并且实现了不同类型的按钮。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