- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Public Attributes

# QStyleOption Class Reference

Search for all occurrences

## Detailed Description

Definition at line 67 of file qstyleoption.h.

`#include <qstyleoption.h>`

Inheritance diagram for QStyleOption:
[legend]

List of all members.

## Public Types
enum | OptionType { SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem, SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, SO_Q3DockWindow, SO_DockWidget, SO_Q3ListViewItem, SO_ViewItem, SO_TabWidgetFrame, SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem, SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox, SO_Q3ListView, SO_TitleBar, SO_GroupBox, SO_SizeGrip, SO_CustomBase = 0xf00, SO_ComplexCustomBase = 0xf000000 }
enum | StyleOptionType { Type = SO_Default }
enum | StyleOptionVersion { Version = 1 }
## Public Member Functions
| QStyleOption (int version=QStyleOption::Version, int type=SO_Default)
| QStyleOption (const QStyleOption &other)
| ~QStyleOption ()
void | init (const QWidget *w)
void | initFrom (const QWidget *w)
QStyleOption & | operator= (const QStyleOption &other)
## Public Attributes
int | version
int | type
QStyle::State | state
Qt::LayoutDirection | direction
QRect | rect
QFontMetrics | fontMetrics
QPalette | palette

## Member Enumeration Documentation

enum OptionType

Search for all occurrences

Enumerator:

  SO_Default | Search for all occurrences
  SO_FocusRect | Search for all occurrences
  SO_Button | Search for all occurrences
  SO_Tab | Search for all occurrences
  SO_MenuItem | Search for all occurrences
  SO_Frame | Search for all occurrences
  SO_ProgressBar | Search for all occurrences
  SO_ToolBox | Search for all occurrences
  SO_Header | Search for all occurrences
  SO_Q3DockWindow | Search for all occurrences
  SO_DockWidget | Search for all occurrences
  SO_Q3ListViewItem | Search for all occurrences
  SO_ViewItem | Search for all occurrences
  SO_TabWidgetFrame | Search for all occurrences
  SO_TabBarBase | Search for all occurrences
  SO_RubberBand | Search for all occurrences
  SO_ToolBar | Search for all occurrences
  SO_GraphicsItem | Search for all occurrences
  SO_Complex | Search for all occurrences
  SO_Slider | Search for all occurrences
  SO_SpinBox | Search for all occurrences
  SO_ToolButton | Search for all occurrences
  SO_ComboBox | Search for all occurrences
  SO_Q3ListView | Search for all occurrences
  SO_TitleBar | Search for all occurrences
  SO_GroupBox | Search for all occurrences
  SO_SizeGrip | Search for all occurrences
  SO_CustomBase | Search for all occurrences
  SO_ComplexCustomBase | Search for all occurrences

Definition at line 70 of file qstyleoption.h.

                        {
                          SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem,
                          SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header, SO_Q3DockWindow,
                          SO_DockWidget, SO_Q3ListViewItem, SO_ViewItem, SO_TabWidgetFrame,
                          SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem,

                          SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox,
                          SO_Q3ListView, SO_TitleBar, SO_GroupBox, SO_SizeGrip,

                          SO_CustomBase = 0xf00,
                          SO_ComplexCustomBase = 0xf000000
                        };

enum StyleOptionType

Search for all occurrences

Enumerator:

  Type | Search for all occurrences

Reimplemented in QStyleOptionFocusRect, QStyleOptionFrame, QStyleOptionTabWidgetFrame, QStyleOptionTabBarBase, QStyleOptionHeader, QStyleOptionButton, QStyleOptionTab, QStyleOptionToolBar, QStyleOptionProgressBar, QStyleOptionProgressBarV2, QStyleOptionMenuItem, QStyleOptionQ3ListViewItem, QStyleOptionQ3DockWindow, QStyleOptionDockWidget, QStyleOptionViewItem, QStyleOptionToolBox, QStyleOptionRubberBand, QStyleOptionComplex, QStyleOptionSlider, QStyleOptionSpinBox, QStyleOptionQ3ListView, QStyleOptionToolButton, QStyleOptionComboBox, QStyleOptionTitleBar, QStyleOptionGroupBox, QStyleOptionSizeGrip, and QStyleOptionGraphicsItem.

Definition at line 83 of file qstyleoption.h.

    { Type = SO_Default };

enum StyleOptionVersion

Search for all occurrences

Enumerator:

  Version | Search for all occurrences

Reimplemented in QStyleOptionFocusRect, QStyleOptionFrame, QStyleOptionFrameV2, QStyleOptionFrameV3, QStyleOptionTabWidgetFrame, QStyleOptionTabWidgetFrameV2, QStyleOptionTabBarBase, QStyleOptionTabBarBaseV2, QStyleOptionHeader, QStyleOptionButton, QStyleOptionTab, QStyleOptionTabV2, QStyleOptionTabV3, QStyleOptionToolBar, QStyleOptionProgressBar, QStyleOptionProgressBarV2, QStyleOptionMenuItem, QStyleOptionQ3ListViewItem, QStyleOptionQ3DockWindow, QStyleOptionDockWidget, QStyleOptionDockWidgetV2, QStyleOptionViewItem, QStyleOptionViewItemV2, QStyleOptionViewItemV3, QStyleOptionViewItemV4, QStyleOptionToolBox, QStyleOptionToolBoxV2, QStyleOptionRubberBand, QStyleOptionComplex, QStyleOptionSlider, QStyleOptionSpinBox, QStyleOptionQ3ListView, QStyleOptionToolButton, QStyleOptionComboBox, QStyleOptionTitleBar, QStyleOptionGroupBox, QStyleOptionSizeGrip, and QStyleOptionGraphicsItem.

Definition at line 84 of file qstyleoption.h.

    { Version = 1 };

## Constructor & Destructor Documentation

QStyleOption | ( | int | version = `QStyleOption::Version`,
|  | int | type = `SO_Default`
| ) |  |

QStyleOption | ( | const QStyleOption & | other | ) |

~QStyleOption | ( |  | ) |

## Member Function Documentation

void init | ( | const QWidget * | w | ) |

Search for all occurrences

void initFrom | ( | const QWidget * | w | ) | `[inline]`

Search for all occurrences

Definition at line 99 of file qstyleoption.h.

    { init(w); }

QStyleOption& operator= | ( | const QStyleOption & | other | ) |

## Member Data Documentation

int version

Search for all occurrences

Definition at line 86 of file qstyleoption.h.

int type

Search for all occurrences

Definition at line 87 of file qstyleoption.h.

QStyle::State state

Search for all occurrences

Definition at line 88 of file qstyleoption.h.

Qt::LayoutDirection direction

Search for all occurrences

Definition at line 89 of file qstyleoption.h.

QRect rect

Search for all occurrences

Definition at line 90 of file qstyleoption.h.

QFontMetrics fontMetrics

Search for all occurrences

Definition at line 91 of file qstyleoption.h.

QPalette palette

Search for all occurrences

Definition at line 92 of file qstyleoption.h.

The documentation for this class was generated from the following file:

- QtGui/qstyleoption.h

QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption
QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption QStyleOption