QCommandLinkButton 類

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

頭: #include <QCommandLinkButton>
qmake: QT += widgets
Since: Qt 4.4
繼承: QPushButton

特性

公共函數

QCommandLinkButton (QWidget * parent = nullptr)
QCommandLinkButton (const QString & text , QWidget * parent = nullptr)
QCommandLinkButton (const QString & text , const QString & 描述 , QWidget * parent = nullptr)
virtual ~QCommandLinkButton ()
QString description () const
void setDescription (const QString & 描述 )

靜態公共成員

const QMetaObject staticMetaObject

重實現保護函數

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

額外繼承成員

詳細描述

The 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 描述 () const
void setDescription (const QString & 描述 )

flat : bool

此特性確定按鈕是被顯示為平闆,還是帶邊框。

默認情況下,此特性被設為 false。

訪問函數:

bool isFlat () const
void setFlat ( bool )

另請參閱 QPushButton::flat .

成員函數文檔編製

QCommandLinkButton:: QCommandLinkButton ( QWidget * parent = nullptr)

構造命令鏈接采用無文本和 parent .

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

構造命令鏈接采用父級 parent 和文本 text .

QCommandLinkButton:: QCommandLinkButton (const QString & text , const QString & 描述 , QWidget * parent = nullptr)

構造命令鏈接采用 text 描述 ,和 parent .

[虛擬] QCommandLinkButton:: ~QCommandLinkButton ()

析構函數。

[override virtual protected] bool QCommandLinkButton:: event ( QEvent * e )

重實現自 QPushButton::event ().

[override virtual protected] int QCommandLinkButton:: heightForWidth ( int width ) const

重實現自 QWidget::heightForWidth ().

[override virtual protected] QSize QCommandLinkButton:: minimumSizeHint () const

重實現自 QPushButton::minimumSizeHint ().

[override virtual protected] void QCommandLinkButton:: paintEvent ( QPaintEvent * )

重實現自 QPushButton::paintEvent ().

[override virtual protected] QSize QCommandLinkButton:: sizeHint () const

重實現自 QPushButton::sizeHint ().