QCommandLinkButton Class
QCommandLinkButton 提供一个 Vista 风格的命令链接按钮. 更多...
头文件: | #include <QCommandLinkButton> |
qmake: | QT += widgets |
开始支持版本: | Qt 4.4 |
基类: | QPushButton |
属性
- description : QString
- flat : bool
- 3 个属性继承自 QPushButton
- 11 个属性继承自 QAbstractButton
- 59 个属性继承自 QWidget
- 1 个属性继承自 QObject
公有函数
QCommandLinkButton(QWidget *parent = Q_NULLPTR) | |
QCommandLinkButton(const QString &text, QWidget *parent = Q_NULLPTR) | |
QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = Q_NULLPTR) | |
~QCommandLinkButton() | |
QString | description() const |
void | setDescription(const QString &description) |
- 10 个公有函数继承自 QPushButton
- 21 个公有函数继承自 QAbstractButton
- 214 个公有函数继承自 QWidget
- 32 个公有函数继承自 QObject
- 14 个公有函数继承自 QPaintDevice
重新实现的受保护函数
virtual bool | event(QEvent *e) |
virtual int | heightForWidth(int width) const |
virtual QSize | minimumSizeHint() const |
virtual void | paintEvent(QPaintEvent *) |
virtual QSize | sizeHint() const |
- 6 个受保护的函数继承自 QPushButton
- 14 个受保护的函数继承自 QAbstractButton
- 35 个受保护的函数继承自 QWidget
- 9 个受保护的函数继承自 QObject
- 1 个受保护的函数继承自 QPaintDevice
其他继承的成员
- 1 个公有槽函数继承自 QPushButton
- 5 个公有槽函数继承自 QAbstractButton
- 19 个公有槽函数继承自 QWidget
- 1 个公有槽函数继承自 QObject
- 4 个信号继承自 QAbstractButton
- 3 个信号继承自 QWidget
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 5 个静态公有成员继承自 QWidget
- 10 个静态公有成员继承自 QObject
- 6 个受保护的函数继承自 QPushButton
- 14 个受保护的函数继承自 QAbstractButton
- 35 个受保护的函数继承自 QWidget
- 9 个受保护的函数继承自 QObject
- 1 个受保护的函数继承自 QPaintDevice
- 1 个受保护的槽函数继承自 QWidget
- 2 个受保护的变量继承自 QObject
- 1 protected type inherited from QPaintDevice
详细描述
QCommandLinkButton 提供一个 Vista 风格的命令链接按钮.
命令链接按钮是 Windows Vista 引入的一个新控件. 它类似于单选按钮, 用于在一组互斥选项中选择. 命令链接按钮不应该单独使用, 而应该替换向导界面和对话框中的单选按钮, 让用户不再点击 "next"按钮. 命令链接按钮的外观类似于扁平按钮(flat pushbutton), 除了普通文本外, 它还可以显示描述性文本. 默认情况下, 它显示一个箭头图标, 表明按下按钮将打开另一个窗口或页面.
参见 QPushButton 和 QRadioButton.
属性
description : QString
This property holds a descriptive label to complement the button text
Setting this property will set a descriptive text on the button, complementing the text label. This will usually be displayed in a smaller font than the primary text.
访问函数:
QString | description() const |
void | setDescription(const QString &description) |
flat : bool
This property determines whether the button is displayed as a flat panel or with a border.
By default, this property is set to false.
访问函数:
成员函数
QCommandLinkButton::QCommandLinkButton(QWidget *parent = Q_NULLPTR)
Constructs a command link with no text and a parent.
QCommandLinkButton::QCommandLinkButton(const QString &text, QWidget *parent = Q_NULLPTR)
Constructs a command link with the parent parent and the text text.
QCommandLinkButton::QCommandLinkButton(const QString &text, const QString &description, QWidget *parent = Q_NULLPTR)
Constructs a command link with a text, a description, and a parent.
QCommandLinkButton::~QCommandLinkButton()
Destructor.
[virtual protected]
bool QCommandLinkButton::event(QEvent *e)
重新实现 QObject::event().
[virtual protected]
int QCommandLinkButton::heightForWidth(int width) const
重新实现 QWidget::heightForWidth().
[virtual protected]
QSize QCommandLinkButton::minimumSizeHint() const
重新实现 QWidget::minimumSizeHint().
[virtual protected]
void QCommandLinkButton::paintEvent(QPaintEvent *)
重新实现 QWidget::paintEvent().
[virtual protected]
QSize QCommandLinkButton::sizeHint() const
重新实现 QWidget::sizeHint().