QWinThumbnailToolButton 類

The QWinThumbnailToolButton class represents a button in a thumbnail toolbar. 更多...

頭: #include <QWinThumbnailToolButton>
qmake: QT += winextras
Since: Qt 5.2
繼承: QObject

特性

公共函數

QWinThumbnailToolButton (QObject * parent = nullptr)
virtual ~QWinThumbnailToolButton ()
bool dismissOnClick () const
QIcon icon () const
bool isEnabled () const
bool isFlat () const
bool isInteractive () const
bool isVisible () const
void setDismissOnClick (bool dismiss )
void setEnabled (bool enabled )
void setFlat (bool flat )
void setIcon (const QIcon & icon )
void setInteractive (bool interactive )
void setToolTip (const QString & toolTip )
void setVisible (bool visible )
QString toolTip () const

公共槽

void click ()

信號

void clicked ()

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

The QWinThumbnailToolButton class represents a button in a thumbnail toolbar.

Buttons in a QWinThumbnailToolBar are instances of QWinThumbnailToolButton . It provides a set of properties for specifying the attributes of a thumbnail toolbar button. It also provides a signal that is emitted whenever the button is clicked , and a slot to perform clicks programmatically.

另請參閱 QWinThumbnailToolBar .

特性文檔編製

dismissOnClick : bool

This property holds whether the window thumbnail is dismissed after a button click

默認值為 false .

訪問函數:

bool dismissOnClick () const
void setDismissOnClick (bool dismiss )

enabled : bool

This property holds whether the button is enabled

默認值為 true .

A disabled button does not react to user interaction, and is also visually disabled.

訪問函數:

bool isEnabled () const
void setEnabled (bool enabled )

另請參閱 interactive .

flat : bool

This property holds whether the button is flat

默認值為 false .

A flat button does not draw a background nor a frame - only an icon.

訪問函數:

bool isFlat () const
void setFlat (bool flat )

icon : QIcon

This property holds the icon of the button

訪問函數:

QIcon icon () const
void setIcon (const QIcon & icon )

interactive : bool

This property holds whether the button is interactive

默認值為 true .

A non-interactive button does not react to user interaction, but is still visually enabled. A typical use case for non- interactive buttons are notification icons.

訪問函數:

bool isInteractive () const
void setInteractive (bool interactive )

另請參閱 enabled .

toolTip : QString

This property holds the tooltip of the button

訪問函數:

QString toolTip () const
void setToolTip (const QString & toolTip )

visible : bool

This property holds whether the button is visible

默認值為 true .

訪問函數:

bool isVisible () const
void setVisible (bool visible )

成員函數文檔編製

QWinThumbnailToolButton:: QWinThumbnailToolButton ( QObject * parent = nullptr)

構造 QWinThumbnailToolButton 采用指定 parent .

[虛擬] QWinThumbnailToolButton:: ~QWinThumbnailToolButton ()

銷毀 QWinThumbnailToolButton .

[slot] void QWinThumbnailToolButton:: click ()

Performs a click. The clicked () signal is emitted as appropriate.

此函數什麼都不做若按鈕 被禁用 or non-interactive .

[signal] void QWinThumbnailToolButton:: clicked ()

This signal is emitted when the button is clicked.