QCommandLinkButton Class | Qt Widgets 5.12.5

Qt 5.12 | Qt Widgets | C++ Classes | QCommandLinkButton

Qt 5.12.5 Reference Documentation

# QCommandLinkButton Class

The QCommandLinkButton widget provides a Vista style command link button. More...

Header: | #include <QCommandLinkButton>
qmake: | QT += widgets
Since: | Qt 4.4
Inherits: | QPushButton

- List of all members, including inherited members
- Obsolete members

## Properties

- description : QString
- flat : bool

- 3 properties inherited from QPushButton
- 11 properties inherited from QAbstractButton
- 59 properties inherited from QWidget
- 1 property inherited from QObject

## Public Functions

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

- 10 public functions inherited from QPushButton
- 21 public functions inherited from QAbstractButton
- 214 public functions inherited from QWidget
- 31 public functions inherited from QObject
- 14 public functions inherited from QPaintDevice

## Static Public Members

const QMetaObject | staticMetaObject

- 5 static public members inherited from QWidget
- 9 static public members inherited from QObject

## Reimplemented Protected Functions

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

- 6 protected functions inherited from QPushButton
- 14 protected functions inherited from QAbstractButton
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice

### Additional Inherited Members

- 1 public slot inherited from QPushButton
- 5 public slots inherited from QAbstractButton
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 4 signals inherited from QAbstractButton
- 3 signals inherited from QWidget
- 2 signals inherited from QObject
- 6 protected functions inherited from QPushButton
- 14 protected functions inherited from QAbstractButton
- 35 protected functions inherited from QWidget
- 9 protected functions inherited from QObject
- 1 protected function inherited from QPaintDevice
- 1 protected slot inherited from QWidget

## Detailed Description

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.

See also QPushButton and QRadioButton.

## Property Documentation

### 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.

Access functions:

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.

Access functions:

bool | isFlat() const
void | setFlat(bool)

See also QPushButton::flat.

## Member Function Documentation

### QCommandLinkButton::QCommandLinkButton(QWidget *parent = nullptr)

Constructs a command link with no text and a parent.

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

Constructs a command link with the parent parent and the text text.

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

Constructs a command link with a text, a description, and a parent.

### `[virtual]` QCommandLinkButton::~QCommandLinkButton()

Destructor.

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

Reimplemented from QPushButton::event().

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

Reimplemented from QWidget::heightForWidth().

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

Reimplemented from QPushButton::minimumSizeHint().

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

Reimplemented from QPushButton::paintEvent().

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

Reimplemented from QPushButton::sizeHint().