QCommandLinkButton Class

QCommandLinkButton 提供一个 Vista 风格的命令链接按钮. 更多...

头文件: #include <QCommandLinkButton>
qmake: QT += widgets
开始支持版本: Qt 4.4
基类: QPushButton

属性

公有函数

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)

重新实现的受保护函数

virtual bool event(QEvent *e)
virtual int heightForWidth(int width) const
virtual QSize minimumSizeHint() const
virtual void paintEvent(QPaintEvent *)
virtual QSize sizeHint() const

其他继承的成员

详细描述

QCommandLinkButton 提供一个 Vista 风格的命令链接按钮.

命令链接按钮是 Windows Vista 引入的一个新控件. 它类似于单选按钮, 用于在一组互斥选项中选择. 命令链接按钮不应该单独使用, 而应该替换向导界面和对话框中的单选按钮, 让用户不再点击 "next"按钮. 命令链接按钮的外观类似于扁平按钮(flat pushbutton), 除了普通文本外, 它还可以显示描述性文本. 默认情况下, 它显示一个箭头图标, 表明按下按钮将打开另一个窗口或页面.

参见 QPushButtonQRadioButton.

属性

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.

访问函数:

bool isFlat() const
void setFlat(bool)

参见 QPushButton::flat.

成员函数

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().