Home · All Classes · Modules

QStyleOptionToolButton Class Reference
[QtGui module]

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. More...

Inherits QStyleOptionComplex.

Types

Methods

Members

Static Members


Detailed Description

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

The QStyleOptionToolButton class is used for drawing QToolButton.


Type Documentation

QStyleOptionToolButton.ToolButtonFeature

Describes the various features that a tool button can have.

Constant Value Description
QStyleOptionToolButton.None 0x00 A normal tool button.
QStyleOptionToolButton.Arrow 0x01 The tool button is an arrow.
QStyleOptionToolButton.Menu 0x04 The tool button has a menu.
QStyleOptionToolButton.PopupDelay 0x08 There is a delay to showing the menu.


The ToolButtonFeatures type is a typedef for QFlags<ToolButtonFeature>. It stores an OR combination of ToolButtonFeature values.

See also features, QToolButton.toolButtonStyle(), and QToolButton.popupMode().


Method Documentation

QStyleOptionToolButton.__init__ (self)

Constructs a QStyleOptionToolButton. The members variables are initialized to default values.

QStyleOptionToolButton.__init__ (self, QStyleOptionToolButton other)

Constructs a copy of the other style option.


Member Documentation

Qt.ArrowType arrowType

This variable holds the direction of the arrow for the tool button.

This value is only used if features includes Arrow.

ToolButtonFeatures features

This variable holds the features of the tool button.

This variable is a bitwise OR describing the features of the button.

See also ToolButtonFeature.

QFont font

This variable holds the font that is used for the text.

This value is only used if toolButtonStyle is Qt.ToolButtonTextUnderIcon, Qt.ToolButtonTextBesideIcon, or Qt.ToolButtonTextOnly

QIcon icon

This variable holds the icon for the tool button.

See also iconSize.

QSize iconSize

This variable holds the size of the icon for the tool button.

QPoint pos

This variable holds the position of the tool button.

QString text

This variable holds the text of the tool button.

This value is only used if toolButtonStyle is Qt.ToolButtonTextUnderIcon, Qt.ToolButtonTextBesideIcon, or Qt.ToolButtonTextOnly

Qt.ToolButtonStyle toolButtonStyle

This variable holds used to describe the appearance of a tool button.

See also QToolButton.toolButtonStyle().

int Type

This member should be treated as a constant.

Equals SO_ToolButton.

int Version

This member should be treated as a constant.

Equals 1.


PyQt 4.0.1 for X11Copyright © Riverbank Computing Ltd and Trolltech AS 2006Qt 4.1.4