Compatibility Members for QToolButton

以下成员源于类 QToolButton are part of the Qt compatibility layer. We advise against using them in new code.

公共类型

enum TextPosition { BesideIcon, BelowIcon }

公共函数

QToolButton (QWidget * parent , const char * name )
QToolButton (Qt::ArrowType type , QWidget * parent , const char * name )
QToolButton (const QIcon & icon , const QString & textLabel , const QString & statusTip , QObject * receiver , const char * slot , QWidget * parent , const char * name = 0)
QIcon iconSet () const
QIcon offIconSet () const
QIcon onIconSet () const
void openPopup ()
QMenu * popup () const
int popupDelay () const
void setIconSet (const QIcon & icon )
void setPixmap (const QPixmap & pixmap )
void setPopup (QMenu * popup )
void setPopupDelay (int delay )
void setTextLabel (const QString & text , bool tooltip = true)
QString textLabel () const
TextPosition textPosition () const
bool usesBigPixmap () const
bool usesTextLabel () const

公共槽

void setTextPosition (QToolButton::TextPosition pos )
void setUsesBigPixmap (bool enable )
void setUsesTextLabel (bool enable )

成员类型文档编制

enum QToolButton:: TextPosition

This enum describes the position of the tool button's text label in relation to the tool button's icon.

常量 描述
QToolButton::BesideIcon 0 文本出现在图标旁边。
QToolButton::BelowIcon 1 The text appears below the icon.

成员函数文档编制

QToolButton:: QToolButton ( QWidget * parent , const char * name )

Constructs an empty tool button called name ,采用父级 parent .

QToolButton:: QToolButton ( Qt::ArrowType type , QWidget * parent , const char * name )

Constructs a tool button as an arrow button. The Qt::ArrowType type defines the arrow direction. Possible values are Qt::LeftArrow , Qt::RightArrow , Qt::UpArrow ,和 Qt::DownArrow .

An arrow button has auto-repeat turned on by default.

The parent and name arguments are sent to the QWidget 构造函数。

QToolButton:: QToolButton (const QIcon & icon , const QString & textLabel , const QString & statusTip , QObject * receiver , const char * slot , QWidget * parent , const char * name = 0)

Constructs a tool button called name , that is a child of parent .

The tool button will display the given icon , with its text label and tool tip set to textLabel and its status bar message set to statusTip . It will be connected to the slot 在对象 receiver .

QIcon QToolButton:: iconSet () const

使用 icon () 代替。

另请参阅 setIconSet ().

QIcon QToolButton:: offIconSet () const

使用 icon () 代替。

另请参阅 setOffIconSet ().

QIcon QToolButton:: onIconSet () const

使用 icon () 代替。

另请参阅 setOnIconSet ().

void QToolButton:: openPopup ()

使用 showMenu () 代替。

使用 menu () 代替。

另请参阅 setPopup ().

int QToolButton:: popupDelay () const

Use the style hint QStyle::SH_ToolButton_PopupDelay 代替。

另请参阅 setPopupDelay ().

void QToolButton:: setIconSet (const QIcon & icon )

使用 setIcon () 代替。

另请参阅 iconSet ().

void QToolButton:: setPixmap (const QPixmap & pixmap )

使用 setIcon ( QIcon (pixmap)) instead.

void QToolButton:: setPopup ( QMenu * popup )

使用 setMenu () 代替。

另请参阅 popup ().

void QToolButton:: setPopupDelay ( int delay )

Use the style hint QStyle::SH_ToolButton_PopupDelay 代替。

另请参阅 popupDelay ().

void QToolButton:: setTextLabel (const QString & text , bool tooltip = true)

使用 setText () 和 setToolTip () 代替。

另请参阅 textLabel ().

[slot] void QToolButton:: setTextPosition ( QToolButton::TextPosition pos )

使用 setToolButtonStyle () 代替。

另请参阅 textPosition ().

[slot] void QToolButton:: setUsesBigPixmap ( bool enable )

使用 setIconSize () 代替。

另请参阅 usesBigPixmap ().

[slot] void QToolButton:: setUsesTextLabel ( bool enable )

使用 setToolButtonStyle () 代替。

另请参阅 usesTextLabel ().

QString QToolButton:: textLabel () const

使用 text () 代替。

另请参阅 setTextLabel ().

TextPosition QToolButton:: textPosition () const

使用 toolButtonStyle () 代替。

另请参阅 setTextPosition ().

bool QToolButton:: usesBigPixmap () const

使用 iconSize () 代替。

另请参阅 setUsesBigPixmap ().

bool QToolButton:: usesTextLabel () const

使用 toolButtonStyle () 代替。

另请参阅 setUsesTextLabel ().