Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QStyleOptionToolButton Class Reference
[QtGui module]

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

#include <QStyleOptionToolButton>

Inherits QStyleOptionComplex.

Public Types

Public Functions

Public Variables

Static Public 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.


Member Type Documentation

enum QStyleOptionToolButton::ToolButtonFeature
flags QStyleOptionToolButton::ToolButtonFeatures

Describes the various features that a tool button can have.

ConstantValueDescription
QStyleOptionToolButton::None0x00A normal tool button.
QStyleOptionToolButton::Arrow0x01The tool button is an arrow.
QStyleOptionToolButton::Menu0x04The tool button has a menu.
QStyleOptionToolButton::PopupDelay0x08There 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().


Member Function Documentation

QStyleOptionToolButton::QStyleOptionToolButton ()

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

QStyleOptionToolButton::QStyleOptionToolButton ( const QStyleOptionToolButton & other )

Constructs a copy of the other style option.


Member Variable Documentation

const int QStyleOptionToolButton::Type

Equals SO_ToolButton.

const int QStyleOptionToolButton::Version

Equals 1.

Qt::ArrowType QStyleOptionToolButton::arrowType

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

This value is only used if features includes Arrow.

ToolButtonFeatures QStyleOptionToolButton::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 QStyleOptionToolButton::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 QStyleOptionToolButton::icon

This variable holds the icon for the tool button.

See also iconSize.

QSize QStyleOptionToolButton::iconSize

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

QPoint QStyleOptionToolButton::pos

This variable holds the position of the tool button.

QString QStyleOptionToolButton::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 QStyleOptionToolButton::toolButtonStyle

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

See also QToolButton::toolButtonStyle().


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0
Hosted by uCoz