QWinThumbnailToolButton 类

QWinThumbnailToolButton 类表示缩略图工具栏按钮。 更多...

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

该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

该类在 Qt 5.2 引入。

特性

公共函数

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 ()

详细描述

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)

Constructs a QWinThumbnailToolButton with the specified parent .

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

[虚拟] QWinThumbnailToolButton:: ~QWinThumbnailToolButton ()

销毁 QWinThumbnailToolButton .