#### PyKDE - Python Bindings for KDE

# class KStyle |
Table of contents
Modules
kdefx Classes
All Classes

Module | kdefx
Class | KStyle
Inherits | QCommonStyle

### enums

- KStyleOption = {Default, AllowMenuTransparency, FilledFrameWorkaround }
- KStylePixelMetric = {KPM_MenuItemSeparatorHeight, KPM_MenuItemHMargin, KPM_MenuItemVMargin, KPM_MenuItemHFrame, KPM_MenuItemVFrame, KPM_MenuItemCheckMarkHMargin, KPM_MenuItemArrowHMargin, KPM_MenuItemTabSpacing, KPM_ListViewBranchThickness }
- KStylePrimitive = {KPE_DockWindowHandle, KPE_ToolBarHandle, KPE_GeneralHandle, KPE_SliderGroove, KPE_SliderHandle, KPE_ListViewExpander, KPE_ListViewBranch }
- KStyleScrollBarType = {WindowsStyleScrollBar, PlatinumStyleScrollBar, ThreeButtonScrollBar, NextStyleScrollBar }

### methods

- KStyle (flags = KStyle .Default, sbtype = KStyle .WindowsStyleScrollBar)

  returns a KStyle instance
  Argument | Type | Default
  --- | --- | ---
  flags | KStyle.KStyleFlags | KStyle .Default
  sbtype | KStyle.KStyleScrollBarType | KStyle .WindowsStyleScrollBar

- KStyle (a0)

  returns a KStyle instance
  Argument | Type | Default
  --- | --- | ---
  a0 | KStyle |

- defaultStyle ()

  returns (QString)
  In versions KDE 3.1.0 and above only
  static

- drawComplexControl (control, p, widget, r, cg, flags = Style_Default, controls = SC_All, active = SC_None, a0 = QStyleOption (QStyleOption .Default ))

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  control | ComplexControl |
  p | QPainter |
  widget | QWidget |
  r | QRect |
  cg | QColorGroup |
  flags | SFlags | Style_Default
  controls | SCFlags | SC_All
  active | SCFlags | SC_None
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- drawControl (element, p, widget, r, cg, flags = Style_Default, a0 = QStyleOption (QStyleOption .Default ))

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  element | ControlElement |
  p | QPainter |
  widget | QWidget |
  r | QRect |
  cg | QColorGroup |
  flags | SFlags | Style_Default
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- drawKStylePrimitive (kpe, p, widget, r, cg, flags = Style_Default, a0 = QStyleOption (QStyleOption .Default ))

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  kpe | KStyle.KStylePrimitive |
  p | QPainter |
  widget | QWidget |
  r | QRect |
  cg | QColorGroup |
  flags | SFlags | Style_Default
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- drawPrimitive (pe, p, r, cg, flags = Style_Default, a0 = QStyleOption (QStyleOption .Default ))

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  pe | PrimitiveElement |
  p | QPainter |
  r | QRect |
  cg | QColorGroup |
  flags | SFlags | Style_Default
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- eventFilter (object, event)

  returns (bool)
  Argument | Type | Default
  --- | --- | ---
  object | QObject |
  event | QEvent |

- kPixelMetric (kpm, widget = 0)

  returns (int)
  Argument | Type | Default
  --- | --- | ---
  kpm | KStyle.KStylePixelMetric |
  widget | QWidget | 0

- pixelMetric (m, widget = 0)

  returns (int)
  Argument | Type | Default
  --- | --- | ---
  m | PixelMetric |
  widget | QWidget | 0

- polish (widget)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  widget | QWidget |

- polishPopupMenu (a0)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  a0 | QPopupMenu |

- querySubControl (control, widget, pos, a0 = QStyleOption (QStyleOption .Default ))

  returns (SubControl)
  Argument | Type | Default
  --- | --- | ---
  control | ComplexControl |
  widget | QWidget |
  pos | QPoint |
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- querySubControlMetrics (control, widget, sc, a0 = QStyleOption (QStyleOption .Default ))

  returns (QRect)
  Argument | Type | Default
  --- | --- | ---
  control | ComplexControl |
  widget | QWidget |
  sc | SubControl |
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- renderMenuBlendPixmap (pix, cg, popup)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  pix | KPixmap |
  cg | QColorGroup |
  popup | QPopupMenu |

- setScrollBarType (sbtype)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  sbtype | KStyle.KStyleScrollBarType |

- styleFlags ()

  returns (KStyle.KStyleFlags)

- styleHint (sh, w = 0, opt = QStyleOption (QStyleOption .Default ), shr = 0)

  returns (int)
  Argument | Type | Default
  --- | --- | ---
  sh | StyleHint |
  w | QWidget | 0
  opt | QStyleOption | QStyleOption (QStyleOption .Default )
  shr | QStyleHintReturn | 0

- stylePixmap (stylepixmap, widget = 0, a0 = QStyleOption (QStyleOption .Default ))

  returns (QPixmap)
  Argument | Type | Default
  --- | --- | ---
  stylepixmap | StylePixmap |
  widget | QWidget | 0
  a0 | QStyleOption | QStyleOption (QStyleOption .Default )

- subRect (r, widget)

  returns (QRect)
  Argument | Type | Default
  --- | --- | ---
  r | SubRect |
  widget | QWidget |

- unPolish (widget)

  returns nothing
  Argument | Type | Default
  --- | --- | ---
  widget | QWidget |