QCommandLinkButton 小部件提供 Vista 風格的命令鏈接按鈕。 更多...
| 頭: | #include <QCommandLinkButton> |
| qmake: | QT += widgets |
| Since: | Qt 4.4 |
| 繼承: | QPushButton |
該類在 Qt 4.4 引入。
| QCommandLinkButton (const QString & text , const QString & 描述 , QWidget * parent = nullptr) | |
| QCommandLinkButton (const QString & text , QWidget * parent = nullptr) | |
| QCommandLinkButton (QWidget * parent = nullptr) | |
| virtual | ~QCommandLinkButton () |
| QString | description () const |
| void | setDescription (const QString & 描述 ) |
| 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 command link is a new control that was introduced by Windows Vista. Its 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 .
此特性保持描述性標簽,以補充按鈕文本
設置此特性將在按鈕上設置描述性文本,以補充文本標簽。這通常會以比首要文本更小的字體顯示。
訪問函數:
| QString | 描述 () const |
| void | setDescription (const QString & 描述 ) |
此特性確定按鈕是被顯示為平闆,還是帶邊框。
默認情況下,此特性被設為 false。
訪問函數:
| bool | isFlat () const |
| void | setFlat ( bool ) |
另請參閱 QPushButton::flat .
構造命令鏈接采用 text , 描述 ,和 parent .
構造命令鏈接采用父級 parent 和文本 text .
構造命令鏈接采用無文本和 parent .
[虛擬]
QCommandLinkButton::
~QCommandLinkButton
()
析構函數。
[override virtual protected]
bool
QCommandLinkButton::
event
(
QEvent
*
e
)
重實現: QPushButton::event (QEvent *e).
[override virtual protected]
int
QCommandLinkButton::
heightForWidth
(
int
width
) const
重實現: QWidget::heightForWidth (int w) const.
[override virtual protected]
QSize
QCommandLinkButton::
minimumSizeHint
() const
重實現: QPushButton::minimumSizeHint () const.
[override virtual protected]
void
QCommandLinkButton::
paintEvent
(
QPaintEvent *
)
重實現: QPushButton::paintEvent (QPaintEvent *).
[override virtual protected]
QSize
QCommandLinkButton::
sizeHint
() const
重實現: QPushButton::sizeHint () const.