QCommandLinkButton 类

QCommandLinkButton widget provides a Vista style command link button. 更多...

头: #include <QCommandLinkButton>
qmake: QT += widgets
Since: 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 widget provides a Vista style command link button.

The command link is a new control that was introduced by Windows Vista. It's intended use is similar to that of a radio button in that it is used to choose between a set of mutually exclusive options. Command link buttons should not be used by themselves but rather as an alternative to radio buttons in Wizards and dialogs and makes pressing the "next" button redundant. The appearance is generally similar to that of a flat pushbutton, but it allows for a descriptive text in addition to the normal button text. By default it will also carry an arrow icon, indicating that pressing the control will open another window or page.

另请参阅 QPushButton and QRadioButton .

特性文档编制

description : QString

此特性保持描述性标签,以补充按钮文本

设置此特性将在按钮上设置描述性文本,以补充文本标签。这通常会以比首要文本更小的字体显示。

访问函数:

QString description () const
void setDescription (const QString & description )

flat : bool

此特性确定按钮是被显示为平板,还是带边框。

默认情况下,此特性被设为 false。

访问函数:

bool isFlat () const
void setFlat ( bool )

另请参阅 QPushButton::flat .

成员函数文档编制

QCommandLinkButton:: QCommandLinkButton ( QWidget * parent = Q_NULLPTR)

构造命令链接采用无文本和 parent .

QCommandLinkButton:: QCommandLinkButton (const QString & text , QWidget * parent = Q_NULLPTR)

构造命令链接采用父级 parent 和文本 text .

QCommandLinkButton:: QCommandLinkButton (const QString & text , const QString & description , QWidget * parent = Q_NULLPTR)

构造命令链接采用 text description ,和 parent .

QCommandLinkButton:: ~QCommandLinkButton ()

析构函数。

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