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