QCommandLinkButton 小部件提供 Vista 风格的命令链接按钮。 更多...
头: | #include <QCommandLinkButton> |
qmake: | QT += widgets |
Since: | Qt 4.4 |
继承: | QPushButton |
该类在 Qt 4.4 引入。
QCommandLinkButton (const QString & text , const QString & description , QWidget * parent = nullptr) | |
QCommandLinkButton (const QString & text , QWidget * parent = nullptr) | |
QCommandLinkButton (QWidget * parent = nullptr) | |
virtual | ~QCommandLinkButton () |
QString | description () const |
void | setDescription (const QString & description ) |
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 | description () const |
void | setDescription (const QString & description ) |
此特性确定按钮是被显示为平板,还是带边框。
默认情况下,此特性被设为 false。
访问函数:
bool | isFlat () const |
void | setFlat ( bool ) |
另请参阅 QPushButton::flat .
构造命令链接采用 text , description ,和 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.