Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3507

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qstyle.cpp -->
  <title>QStyle Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QStyle</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#setting-a-style">Setting a Style</a></li>
<li class="level2"><a href="#developing-style-aware-custom-widgets">Developing Style-Aware Custom Widgets</a></li>
<li class="level2"><a href="#creating-a-custom-style">Creating a Custom Style</a></li>
<li class="level2"><a href="#using-a-custom-style">Using a Custom Style</a></li>
<li class="level2"><a href="#right-to-left-desktops">Right-to-Left Desktops</a></li>
<li class="level2"><a href="#styles-in-item-views">Styles in Item Views</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QStyle Class</h1>
<!-- $$$QStyle-brief -->
<p>The <a href="qstyle.html">QStyle</a> class is an abstract base class that encapsulates the look and feel of a GUI. <a href="#details">More...</a></p>
<!-- @@@QStyle -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QStyle&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="../qtcore/qobject.html">QObject</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qcommonstyle.html">QCommonStyle</a></p>
</td></tr></table></div><ul>
<li><a href="qstyle-members.html">List of all members, including inherited members</a></li>
<li><a href="qstyle-obsolete.html">Obsolete members</a></li>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#ComplexControl-enum">ComplexControl</a></b> { CC_SpinBox, CC_ComboBox, CC_ScrollBar, CC_Slider, ..., CC_CustomBase }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#ContentsType-enum">ContentsType</a></b> { CT_CheckBox, CT_ComboBox, CT_HeaderSection, CT_LineEdit, ..., CT_MdiControls }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#ControlElement-enum">ControlElement</a></b> { CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabel, CE_DockWidgetTitle, ..., CE_ShapedFrame }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#PixelMetric-enum">PixelMetric</a></b> { PM_ButtonMargin, PM_DockWidgetTitleBarButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, ..., PM_DefaultLayoutSpacing }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#PrimitiveElement-enum">PrimitiveElement</a></b> { PE_FrameStatusBar, PE_PanelButtonCommand, PE_FrameDefaultButton, PE_PanelButtonBevel, ..., PE_PanelMenu }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#RequestSoftwareInputPanel-enum">RequestSoftwareInputPanel</a></b> { RSIP_OnMouseClickAndAlreadyFocused, RSIP_OnMouseClick }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a></b> { SP_TitleBarMinButton, SP_TitleBarMenuButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, ..., SP_CustomBase }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#StateFlag-enum">State</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#StateFlag-enum">StateFlag</a></b> { State_None, State_Active, State_AutoRaise, State_Children, ..., State_Small }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#StyleHint-enum">StyleHint</a></b> { SH_EtchDisabledText, SH_DitherDisabledText, SH_ScrollBar_ContextMenu, SH_ScrollBar_MiddleClickAbsolutePosition, ..., SH_ItemView_ScrollMode }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#SubControl-enum">SubControl</a></b> { SC_None, SC_ScrollBarAddLine, SC_ScrollBarSubLine, SC_ScrollBarAddPage, ..., SC_All }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#SubControl-enum">SubControls</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#SubElement-enum">SubElement</a></b> { SE_PushButtonContents, SE_PushButtonFocusRect, SE_PushButtonLayoutItem, SE_CheckBoxIndicator, ..., SE_ToolBarHandle }</td></tr>
</table></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#QStyle">QStyle</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#dtor.QStyle">~QStyle</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#combinedLayoutSpacing">combinedLayoutSpacing</a></b>(QSizePolicy::ControlTypes <i>controls1</i>, QSizePolicy::ControlTypes <i>controls2</i>, Qt::Orientation <i>orientation</i>, QStyleOption *<i>option</i> = Q_NULLPTR, QWidget *<i>widget</i> = Q_NULLPTR) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#drawComplexControl">drawComplexControl</a></b>(ComplexControl <i>control</i>, const QStyleOptionComplex *<i>option</i>, QPainter *<i>painter</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#drawControl">drawControl</a></b>(ControlElement <i>element</i>, const QStyleOption *<i>option</i>, QPainter *<i>painter</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#drawItemPixmap">drawItemPixmap</a></b>(QPainter *<i>painter</i>, const QRect &amp;<i>rectangle</i>, int <i>alignment</i>, const QPixmap &amp;<i>pixmap</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#drawItemText">drawItemText</a></b>(QPainter *<i>painter</i>, const QRect &amp;<i>rectangle</i>, int <i>alignment</i>, const QPalette &amp;<i>palette</i>, bool <i>enabled</i>, const QString &amp;<i>text</i>, QPalette::ColorRole <i>textRole</i> = QPalette::NoRole) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#drawPrimitive">drawPrimitive</a></b>(PrimitiveElement <i>element</i>, const QStyleOption *<i>option</i>, QPainter *<i>painter</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPixmap </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#generatedIconPixmap">generatedIconPixmap</a></b>(QIcon::Mode <i>iconMode</i>, const QPixmap &amp;<i>pixmap</i>, const QStyleOption *<i>option</i>) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual SubControl </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#hitTestComplexControl">hitTestComplexControl</a></b>(ComplexControl <i>control</i>, const QStyleOptionComplex *<i>option</i>, const QPoint &amp;<i>position</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#itemPixmapRect">itemPixmapRect</a></b>(const QRect &amp;<i>rectangle</i>, int <i>alignment</i>, const QPixmap &amp;<i>pixmap</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#itemTextRect">itemTextRect</a></b>(const QFontMetrics &amp;<i>metrics</i>, const QRect &amp;<i>rectangle</i>, int <i>alignment</i>, bool <i>enabled</i>, const QString &amp;<i>text</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#layoutSpacing">layoutSpacing</a></b>(QSizePolicy::ControlType <i>control1</i>, QSizePolicy::ControlType <i>control2</i>, Qt::Orientation <i>orientation</i>, const QStyleOption *<i>option</i> = Q_NULLPTR, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#pixelMetric">pixelMetric</a></b>(PixelMetric <i>metric</i>, const QStyleOption *<i>option</i> = Q_NULLPTR, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#polish">polish</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#polish-1">polish</a></b>(QApplication *<i>application</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#polish-2">polish</a></b>(QPalette &amp;<i>palette</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QStyle *</td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#proxy">proxy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#sizeFromContents">sizeFromContents</a></b>(ContentsType <i>type</i>, const QStyleOption *<i>option</i>, const QSize &amp;<i>contentsSize</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QIcon </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#standardIcon">standardIcon</a></b>(StandardPixmap <i>standardIcon</i>, const QStyleOption *<i>option</i> = Q_NULLPTR, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QPalette </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#standardPalette">standardPalette</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#styleHint">styleHint</a></b>(StyleHint <i>hint</i>, const QStyleOption *<i>option</i> = Q_NULLPTR, const QWidget *<i>widget</i> = Q_NULLPTR, QStyleHintReturn *<i>returnData</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#subControlRect">subControlRect</a></b>(ComplexControl <i>control</i>, const QStyleOptionComplex *<i>option</i>, SubControl <i>subControl</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#subElementRect">subElementRect</a></b>(SubElement <i>element</i>, const QStyleOption *<i>option</i>, const QWidget *<i>widget</i> = Q_NULLPTR) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#unpolish">unpolish</a></b>(QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#unpolish-1">unpolish</a></b>(QApplication *<i>application</i>)</td></tr>
</table></div>
<ul>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#alignedRect">alignedRect</a></b>(Qt::LayoutDirection <i>direction</i>, Qt::Alignment <i>alignment</i>, const QSize &amp;<i>size</i>, const QRect &amp;<i>rectangle</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#sliderPositionFromValue">sliderPositionFromValue</a></b>(int <i>min</i>, int <i>max</i>, int <i>logicalValue</i>, int <i>span</i>, bool <i>upsideDown</i> = false)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#sliderValueFromPosition">sliderValueFromPosition</a></b>(int <i>min</i>, int <i>max</i>, int <i>position</i>, int <i>span</i>, bool <i>upsideDown</i> = false)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#visualAlignment">visualAlignment</a></b>(Qt::LayoutDirection <i>direction</i>, Qt::Alignment <i>alignment</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#visualPos">visualPos</a></b>(Qt::LayoutDirection <i>direction</i>, const QRect &amp;<i>boundingRectangle</i>, const QPoint &amp;<i>logicalPosition</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qstyle.html#visualRect">visualRect</a></b>(Qt::LayoutDirection <i>direction</i>, const QRect &amp;<i>boundingRectangle</i>, const QRect &amp;<i>logicalRectangle</i>)</td></tr>
</table></div>
<ul>
<li class="fn">10 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QStyle-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qstyle.html">QStyle</a> class is an abstract base class that encapsulates the look and feel of a GUI.</p>
<p>Qt contains a set of <a href="qstyle.html">QStyle</a> subclasses that emulate the styles of the different platforms supported by Qt (QWindowsStyle, QMacStyle etc.)&#x2e; By default, these styles are built into the Qt GUI module. Styles can also be made available as plugins.</p>
<p>Qt's built-in widgets use <a href="qstyle.html">QStyle</a> to perform nearly all of their drawing, ensuring that they look exactly like the equivalent native widgets. The diagram below shows a <a href="qcombobox.html">QComboBox</a> in nine different styles.</p>
<p class="centerAlign"><img src="images/qstyle-comboboxes.png" alt="Nine combo boxes" /></p><p>Topics:</p>
<a name="setting-a-style"></a>
<h3 >Setting a Style</h3>
<p>The style of the entire application can be set using the <a href="qapplication.html#setStyle">QApplication::setStyle</a>() function. It can also be specified by the user of the application, using the <code>-style</code> command-line option:</p>
<pre class="cpp">

  <span class="operator">.</span><span class="operator">/</span>myapplication <span class="operator">-</span>style windows

</pre>
<p>If no style is specified, Qt will choose the most appropriate style for the user's platform or desktop environment.</p>
<p>A style can also be set on an individual widget using the <a href="qwidget.html#setStyle">QWidget::setStyle</a>() function.</p>
<a name="developing-style-aware-custom-widgets"></a>
<h3 >Developing Style-Aware Custom Widgets</h3>
<p>If you are developing custom widgets and want them to look good on all platforms, you can use <a href="qstyle.html">QStyle</a> functions to perform parts of the widget drawing, such as <a href="qstyle.html#drawItemText">drawItemText</a>(), <a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>(), <a href="qstyle.html#drawPrimitive">drawPrimitive</a>(), <a href="qstyle.html#drawControl">drawControl</a>(), and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>
<p>Most <a href="qstyle.html">QStyle</a> draw functions take four arguments:</p>
<ul>
<li>an enum value specifying which graphical element to draw</li>
<li>a <a href="qstyleoption.html">QStyleOption</a> specifying how and where to render that element</li>
<li>a <a href="../qtgui/qpainter.html">QPainter</a> that should be used to draw the element</li>
<li>a <a href="qwidget.html">QWidget</a> on which the drawing is performed (optional)</li>
</ul>
<p>For example, if you want to draw a focus rectangle on your widget, you can write:</p>
<pre class="cpp">

  <span class="type">void</span> MyWidget<span class="operator">::</span>paintEvent(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span> <span class="operator">*</span> <span class="comment">/* event */</span>)
  {
      <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);

      <span class="type"><a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a></span> option;
      option<span class="operator">.</span>initFrom(<span class="keyword">this</span>);
      option<span class="operator">.</span>backgroundColor <span class="operator">=</span> palette()<span class="operator">.</span>color(<span class="type"><a href="../qtgui/qpalette.html">QPalette</a></span><span class="operator">::</span>Background);

      style()<span class="operator">-</span><span class="operator">&gt;</span>drawPrimitive(<span class="type"><a href="qstyle.html#QStyle">QStyle</a></span><span class="operator">::</span>PE_FrameFocusRect<span class="operator">,</span> <span class="operator">&amp;</span>option<span class="operator">,</span> <span class="operator">&amp;</span>painter<span class="operator">,</span> <span class="keyword">this</span>);
  }

</pre>
<p><a href="qstyle.html">QStyle</a> gets all the information it needs to render the graphical element from <a href="qstyleoption.html">QStyleOption</a>. The widget is passed as the last argument in case the style needs it to perform special effects (such as animated default buttons on macOS), but it isn't mandatory. In fact, you can use <a href="qstyle.html">QStyle</a> to draw on any paint device, not just widgets, by setting the <a href="../qtgui/qpainter.html">QPainter</a> properly.</p>
<p><a href="qstyleoption.html">QStyleOption</a> has various subclasses for the various types of graphical elements that can be drawn. For example, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a> expects a <a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a> argument.</p>
<p>To ensure that drawing operations are as fast as possible, <a href="qstyleoption.html">QStyleOption</a> and its subclasses have public data members. See the <a href="qstyleoption.html">QStyleOption</a> class documentation for details on how to use it.</p>
<p>For convenience, Qt provides the <a href="qstylepainter.html">QStylePainter</a> class, which combines a <a href="qstyle.html">QStyle</a>, a <a href="../qtgui/qpainter.html">QPainter</a>, and a <a href="qwidget.html">QWidget</a>. This makes it possible to write</p>
<pre class="cpp">

      <span class="type"><a href="qstylepainter.html">QStylePainter</a></span> painter(<span class="keyword">this</span>);
      ...
      painter<span class="operator">.</span>drawPrimitive(<span class="type"><a href="qstyle.html#QStyle">QStyle</a></span><span class="operator">::</span>PE_FrameFocusRect<span class="operator">,</span> option);

</pre>
<p>instead of</p>
<pre class="cpp">

      <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> painter(<span class="keyword">this</span>);
      ...
      style()<span class="operator">-</span><span class="operator">&gt;</span>drawPrimitive(<span class="type"><a href="qstyle.html#QStyle">QStyle</a></span><span class="operator">::</span>PE_FrameFocusRect<span class="operator">,</span> <span class="operator">&amp;</span>option<span class="operator">,</span> <span class="operator">&amp;</span>painter<span class="operator">,</span> <span class="keyword">this</span>);

</pre>
<a name="creating-a-custom-style"></a>
<h3 >Creating a Custom Style</h3>
<p>You can create a custom look and feel for your application by creating a custom style. There are two approaches to creating a custom style. In the static approach, you either choose an existing <a href="qstyle.html">QStyle</a> class, subclass it, and reimplement virtual functions to provide the custom behavior, or you create an entire <a href="qstyle.html">QStyle</a> class from scratch. In the dynamic approach, you modify the behavior of your system style at runtime. The static approach is described below. The dynamic approach is described in <a href="qproxystyle.html">QProxyStyle</a>.</p>
<p>The first step in the static approach is to pick one of the styles provided by Qt from which you will build your custom style. Your choice of <a href="qstyle.html">QStyle</a> class will depend on which style resembles your desired style the most. The most general class that you can use as a base is <a href="qcommonstyle.html">QCommonStyle</a> (not <a href="qstyle.html">QStyle</a>). This is because Qt requires its styles to be <a href="qcommonstyle.html">QCommonStyle</a>s.</p>
<p>Depending on which parts of the base style you want to change, you must reimplement the functions that are used to draw those parts of the interface. To illustrate this, we will modify the look of the spin box arrows drawn by QWindowsStyle. The arrows are <i>primitive elements</i> that are drawn by the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() function, so we need to reimplement that function. We need the following class declaration:</p>
<pre class="cpp">

  <span class="keyword">class</span> CustomStyle : <span class="keyword">public</span> <span class="type"><a href="qproxystyle.html">QProxyStyle</a></span>
  {
      Q_OBJECT

  <span class="keyword">public</span>:
      CustomStyle();
      <span class="operator">~</span>CustomStyle() {}

      <span class="type">void</span> drawPrimitive(PrimitiveElement element<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> <span class="operator">*</span>option<span class="operator">,</span>
                         <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> <span class="operator">*</span>painter<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget) <span class="keyword">const</span>;
  };

</pre>
<p>To draw its up and down arrows, <a href="qspinbox.html">QSpinBox</a> uses the <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a> and <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a> primitive elements. Here's how to reimplement the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() function to draw them differently:</p>
<pre class="cpp">

  <span class="type">void</span> CustomStyle<span class="operator">::</span>drawPrimitive(PrimitiveElement element<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> <span class="operator">*</span>option<span class="operator">,</span>
                                  <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> <span class="operator">*</span>painter<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="qwidget.html">QWidget</a></span> <span class="operator">*</span>widget) <span class="keyword">const</span>
  {
      <span class="keyword">if</span> (element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinUp <span class="operator">|</span><span class="operator">|</span> element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinDown) {
          <span class="type"><a href="../qtgui/qpolygon.html">QPolygon</a></span> points(<span class="number">3</span>);
          <span class="type">int</span> x <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>x();
          <span class="type">int</span> y <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>y();
          <span class="type">int</span> w <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>width() <span class="operator">/</span> <span class="number">2</span>;
          <span class="type">int</span> h <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>height() <span class="operator">/</span> <span class="number">2</span>;
          x <span class="operator">+</span><span class="operator">=</span> (option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>width() <span class="operator">-</span> w) <span class="operator">/</span> <span class="number">2</span>;
          y <span class="operator">+</span><span class="operator">=</span> (option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>height() <span class="operator">-</span> h) <span class="operator">/</span> <span class="number">2</span>;

          <span class="keyword">if</span> (element <span class="operator">=</span><span class="operator">=</span> PE_IndicatorSpinUp) {
              points<span class="operator">[</span><span class="number">0</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x<span class="operator">,</span> y <span class="operator">+</span> h);
              points<span class="operator">[</span><span class="number">1</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w<span class="operator">,</span> y <span class="operator">+</span> h);
              points<span class="operator">[</span><span class="number">2</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w <span class="operator">/</span> <span class="number">2</span><span class="operator">,</span> y);
          } <span class="keyword">else</span> { <span class="comment">// PE_SpinBoxDown</span>
              points<span class="operator">[</span><span class="number">0</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x<span class="operator">,</span> y);
              points<span class="operator">[</span><span class="number">1</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w<span class="operator">,</span> y);
              points<span class="operator">[</span><span class="number">2</span><span class="operator">]</span> <span class="operator">=</span> <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span>(x <span class="operator">+</span> w <span class="operator">/</span> <span class="number">2</span><span class="operator">,</span> y <span class="operator">+</span> h);
          }

          <span class="keyword">if</span> (option<span class="operator">-</span><span class="operator">&gt;</span>state <span class="operator">&amp;</span> State_Enabled) {
              painter<span class="operator">-</span><span class="operator">&gt;</span>setPen(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>mid()<span class="operator">.</span>color());
              painter<span class="operator">-</span><span class="operator">&gt;</span>setBrush(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>buttonText());
          } <span class="keyword">else</span> {
              painter<span class="operator">-</span><span class="operator">&gt;</span>setPen(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>buttonText()<span class="operator">.</span>color());
              painter<span class="operator">-</span><span class="operator">&gt;</span>setBrush(option<span class="operator">-</span><span class="operator">&gt;</span>palette<span class="operator">.</span>mid());
          }
          painter<span class="operator">-</span><span class="operator">&gt;</span>drawPolygon(points);
      } <span class="keyword">else</span> {
      <span class="type"><a href="qproxystyle.html">QProxyStyle</a></span><span class="operator">::</span>drawPrimitive(element<span class="operator">,</span> option<span class="operator">,</span> painter<span class="operator">,</span> widget);
      }
  }

</pre>
<p>Notice that we don't use the <code>widget</code> argument, except to pass it on to the QWindowStyle::drawPrimitive() function. As mentioned earlier, the information about what is to be drawn and how it should be drawn is specified by a <a href="qstyleoption.html">QStyleOption</a> object, so there is no need to ask the widget.</p>
<p>If you need to use the <code>widget</code> argument to obtain additional information, be careful to ensure that it isn't 0 and that it is of the correct type before using it. For example:</p>
<pre class="cpp">

      <span class="keyword">const</span> <span class="type"><a href="qspinbox.html">QSpinBox</a></span> <span class="operator">*</span>spinBox <span class="operator">=</span> qobject_cast<span class="operator">&lt;</span><span class="keyword">const</span> <span class="type"><a href="qspinbox.html">QSpinBox</a></span> <span class="operator">*</span><span class="operator">&gt;</span>(widget);
      <span class="keyword">if</span> (spinBox) {
      ...
      }

</pre>
<p>When implementing a custom style, you cannot assume that the widget is a <a href="qspinbox.html">QSpinBox</a> just because the enum value is called <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a> or <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a>.</p>
<p>The documentation for the <a href="qtwidgets-widgets-styles-example.html">Styles</a> example covers this topic in more detail.</p>
<p><b>Warning:</b> Qt style sheets are currently not supported for custom <a href="qstyle.html">QStyle</a> subclasses. We plan to address this in some future release.</p>
<a name="using-a-custom-style"></a>
<h3 >Using a Custom Style</h3>
<p>There are several ways of using a custom style in a Qt application. The simplest way is to pass the custom style to the <a href="qapplication.html#setStyle">QApplication::setStyle</a>() static function before creating the <a href="qapplication.html">QApplication</a> object:</p>
<pre class="cpp">

  <span class="preprocessor">#include &lt;QtWidgets&gt;</span>

  <span class="preprocessor">#include &quot;customstyle.h&quot;</span>

  <span class="type">int</span> main(<span class="type">int</span> argc<span class="operator">,</span> <span class="type">char</span> <span class="operator">*</span>argv<span class="operator">[</span><span class="operator">]</span>)
  {
      <span class="type"><a href="qapplication.html">QApplication</a></span><span class="operator">::</span>setStyle(<span class="keyword">new</span> CustomStyle);
      <span class="type"><a href="qapplication.html">QApplication</a></span> app(argc<span class="operator">,</span> argv);
      <span class="type"><a href="qspinbox.html">QSpinBox</a></span> spinBox;
      spinBox<span class="operator">.</span>show();
      <span class="keyword">return</span> app<span class="operator">.</span>exec();
  }

</pre>
<p>You can call <a href="qapplication.html#setStyle">QApplication::setStyle</a>() at any time, but by calling it before the constructor, you ensure that the user's preference, set using the <code>-style</code> command-line option, is respected.</p>
<p>You may want to make your custom style available for use in other applications, which may not be yours and hence not available for you to recompile. The Qt Plugin system makes it possible to create styles as plugins. Styles created as plugins are loaded as shared objects at runtime by Qt itself. Please refer to the Qt Plugin documentation for more information on how to go about creating a style plugin.</p>
<p>Compile your plugin and put it into Qt's <code>plugins/styles</code> directory. We now have a pluggable style that Qt can load automatically. To use your new style with existing applications, simply start the application with the following argument:</p>
<pre class="cpp">

  <span class="operator">.</span><span class="operator">/</span>myapplication <span class="operator">-</span>style custom

</pre>
<p>The application will use the look and feel from the custom style you implemented.</p>
<a name="right-to-left-desktops"></a>
<h3 >Right-to-Left Desktops</h3>
<p>Languages written from right to left (such as Arabic and Hebrew) usually also mirror the whole layout of widgets, and require the light to come from the screen's top-right corner instead of top-left.</p>
<p>If you create a custom style, you should take special care when drawing asymmetric elements to make sure that they also look correct in a mirrored layout. An easy way to test your styles is to run applications with the <code>-reverse</code> command-line option or to call <a href="../qtgui/qguiapplication.html#layoutDirection-prop">QApplication::setLayoutDirection</a>() in your <code>main()</code> function.</p>
<p>Here are some things to keep in mind when making a style work well in a right-to-left environment:</p>
<ul>
<li><a href="qstyle.html#subControlRect">subControlRect</a>() and <a href="qstyle.html#subElementRect">subElementRect</a>() return rectangles in screen coordinates</li>
<li><a href="qstyleoption.html#direction-var">QStyleOption::direction</a> indicates in which direction the item should be drawn in</li>
<li>If a style is not right-to-left aware it will display items as if it were left-to-right</li>
<li><a href="qstyle.html#visualRect">visualRect</a>(), <a href="qstyle.html#visualPos">visualPos</a>(), and <a href="qstyle.html#visualAlignment">visualAlignment</a>() are helpful functions that will translate from logical to screen representations.</li>
<li><a href="qstyle.html#alignedRect">alignedRect</a>() will return a logical rect aligned for the current direction</li>
</ul>
<a name="styles-in-item-views"></a>
<h3 >Styles in Item Views</h3>
<p>The painting of items in views is performed by a delegate. Qt's default delegate, <a href="qstyleditemdelegate.html">QStyledItemDelegate</a>, is also used for calculating bounding rectangles of items, and their sub-elements for the various kind of item <a href="../qtcore/qt.html#ItemDataRole-enum">data roles</a> <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> supports. See the <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> class description to find out which datatypes and roles are supported. You can read more about item data roles in <a href="model-view-programming.html">Model/View Programming</a>.</p>
<p>When <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> paints its items, it draws <a href="qstyle.html#ControlElement-enum">CE_ItemViewItem</a>, and calculates their size with <a href="qstyle.html#ContentsType-enum">CT_ItemViewItem</a>. Note also that it uses <a href="qstyle.html#SubElement-enum">SE_ItemViewItemText</a> to set the size of editors. When implementing a style to customize drawing of item views, you need to check the implementation of <a href="qcommonstyle.html">QCommonStyle</a> (and any other subclasses from which your style inherits). This way, you find out which and how other style elements are painted, and you can then reimplement the painting of elements that should be drawn differently.</p>
<p>We include a small example where we customize the drawing of item backgrounds.</p>
<pre class="cpp">

      <span class="keyword">switch</span> (element) {
          <span class="keyword">case</span> (PE_PanelItemViewItem): {
              painter<span class="operator">-</span><span class="operator">&gt;</span>save();

              <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> topLeft <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>topLeft();
              <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> bottomRight <span class="operator">=</span> option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">.</span>topRight();
              <span class="type"><a href="../qtgui/qlineargradient.html">QLinearGradient</a></span> backgroundGradient(topLeft<span class="operator">,</span> bottomRight);
              backgroundGradient<span class="operator">.</span>setColorAt(<span class="number">0.0</span><span class="operator">,</span> <span class="type"><a href="../qtgui/qcolor.html">QColor</a></span>(<span class="type"><a href="../qtcore/qt.html">Qt</a></span><span class="operator">::</span>yellow)<span class="operator">.</span>lighter(<span class="number">190</span>));
              backgroundGradient<span class="operator">.</span>setColorAt(<span class="number">1.0</span><span class="operator">,</span> <span class="type"><a href="../qtcore/qt.html">Qt</a></span><span class="operator">::</span>white);
              painter<span class="operator">-</span><span class="operator">&gt;</span>fillRect(option<span class="operator">-</span><span class="operator">&gt;</span>rect<span class="operator">,</span> <span class="type"><a href="../qtgui/qbrush.html">QBrush</a></span>(backgroundGradient));

              painter<span class="operator">-</span><span class="operator">&gt;</span>restore();
          <span class="keyword">break</span>;
          }
          <span class="keyword">default</span>:
              <span class="type"><a href="qproxystyle.html">QProxyStyle</a></span><span class="operator">::</span>drawPrimitive(element<span class="operator">,</span> option<span class="operator">,</span> painter<span class="operator">,</span> widget);
      }

</pre>
<p>The primitive element <a href="qstyle.html#PrimitiveElement-enum">PE_PanelItemViewItem</a> is responsible for painting the background of items, and is called from <a href="qcommonstyle.html">QCommonStyle</a>'s implementation of <a href="qstyle.html#ControlElement-enum">CE_ItemViewItem</a>.</p>
<p>To add support for drawing of new datatypes and item data roles, it is necessary to create a custom delegate. But if you only need to support the datatypes implemented by the default delegate, a custom style does not need an accompanying delegate. The <a href="qstyleditemdelegate.html">QStyledItemDelegate</a> class description gives more information on custom delegates.</p>
<p>The drawing of item view headers is also done by the style, giving control over size of header items and row and column sizes.</p>
</div>
<p><b>See also </b><a href="qstyleoption.html">QStyleOption</a>, <a href="qstylepainter.html">QStylePainter</a>, <a href="qtwidgets-widgets-styles-example.html">Styles Example</a>, <a href="style-reference.html">Styles and Style Aware Widgets</a>, <a href="qstyleditemdelegate.html">QStyledItemDelegate</a>, and <a href="qwidget-styling.html">Styling</a>.</p>
<!-- @@@QStyle -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ComplexControl$$$CC_SpinBox$$$CC_ComboBox$$$CC_ScrollBar$$$CC_Slider$$$CC_ToolButton$$$CC_TitleBar$$$CC_Dial$$$CC_GroupBox$$$CC_MdiControls$$$CC_CustomBase -->
<h3 class="fn" id="ComplexControl-enum"><a name="ComplexControl-enum"></a>enum QStyle::<span class="name">ComplexControl</span></h3>
<p>This enum describes the available complex controls. Complex controls have different behavior depending upon where the user clicks on them or which keys are pressed.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::CC_SpinBox</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A spinbox, like <a href="qspinbox.html">QSpinBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_ComboBox</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A combobox, like <a href="qcombobox.html">QComboBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_ScrollBar</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A scroll bar, like <a href="qscrollbar.html">QScrollBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_Slider</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A slider, like <a href="qslider.html">QSlider</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_ToolButton</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">A tool button, like <a href="qtoolbutton.html">QToolButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_TitleBar</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">A Title bar, like those used in <a href="qmdisubwindow.html">QMdiSubWindow</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_GroupBox</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">A group box, like <a href="qgroupbox.html">QGroupBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_Dial</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">A dial, like <a href="qdial.html">QDial</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_MdiControls</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The minimize, close, and normal button in the menu bar for a maximized MDI subwindow.</td></tr>
<tr><td class="topAlign"><code>QStyle::CC_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom complex controls. Custom values must be greater than this value.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#SubControl-enum">SubControl</a> and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>
<!-- @@@ComplexControl -->
<!-- $$$ContentsType$$$CT_PushButton$$$CT_CheckBox$$$CT_RadioButton$$$CT_ToolButton$$$CT_ComboBox$$$CT_Splitter$$$CT_ProgressBar$$$CT_MenuItem$$$CT_MenuBarItem$$$CT_MenuBar$$$CT_Menu$$$CT_TabBarTab$$$CT_Slider$$$CT_ScrollBar$$$CT_LineEdit$$$CT_SpinBox$$$CT_SizeGrip$$$CT_TabWidget$$$CT_DialogButtons$$$CT_HeaderSection$$$CT_GroupBox$$$CT_MdiControls$$$CT_ItemViewItem$$$CT_CustomBase -->
<h3 class="fn" id="ContentsType-enum"><a name="ContentsType-enum"></a>enum QStyle::<span class="name">ContentsType</span></h3>
<p>This enum describes the available contents types. These are used to calculate sizes for the contents of various widgets.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::CT_CheckBox</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">A check box, like <a href="qcheckbox.html">QCheckBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_ComboBox</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">A combo box, like <a href="qcombobox.html">QComboBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_HeaderSection</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">A header section, like QHeader.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_LineEdit</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">A line edit, like <a href="qlineedit.html">QLineEdit</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_Menu</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">A menu, like <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_MenuBar</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">A menu bar, like <a href="qmenubar.html">QMenuBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_MenuBarItem</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">A menu bar item, like the buttons in a <a href="qmenubar.html">QMenuBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_MenuItem</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">A menu item, like QMenuItem.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_ProgressBar</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">A progress bar, like <a href="qprogressbar.html">QProgressBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_PushButton</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A push button, like <a href="qpushbutton.html">QPushButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_RadioButton</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A radio button, like <a href="qradiobutton.html">QRadioButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_SizeGrip</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">A size grip, like <a href="qsizegrip.html">QSizeGrip</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_Slider</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">A slider, like <a href="qslider.html">QSlider</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_ScrollBar</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">A scroll bar, like <a href="qscrollbar.html">QScrollBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_SpinBox</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">A spin box, like <a href="qspinbox.html">QSpinBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_Splitter</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">A splitter, like <a href="qsplitter.html">QSplitter</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_TabBarTab</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">A tab on a tab bar, like <a href="qtabbar.html">QTabBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_TabWidget</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">A tab widget, like <a href="qtabwidget.html">QTabWidget</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_ToolButton</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A tool button, like <a href="qtoolbutton.html">QToolButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_GroupBox</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">A group box, like <a href="qgroupbox.html">QGroupBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_ItemViewItem</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">An item inside an item view.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom contents types. Custom values must be greater than this value.</td></tr>
<tr><td class="topAlign"><code>QStyle::CT_MdiControls</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">The minimize, normal, and close button in the menu bar for a maximized MDI subwindow.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#sizeFromContents">sizeFromContents</a>().</p>
<!-- @@@ContentsType -->
<!-- $$$ControlElement$$$CE_PushButton$$$CE_PushButtonBevel$$$CE_PushButtonLabel$$$CE_CheckBox$$$CE_CheckBoxLabel$$$CE_RadioButton$$$CE_RadioButtonLabel$$$CE_TabBarTab$$$CE_TabBarTabShape$$$CE_TabBarTabLabel$$$CE_ProgressBar$$$CE_ProgressBarGroove$$$CE_ProgressBarContents$$$CE_ProgressBarLabel$$$CE_MenuItem$$$CE_MenuScroller$$$CE_MenuVMargin$$$CE_MenuHMargin$$$CE_MenuTearoff$$$CE_MenuEmptyArea$$$CE_MenuBarItem$$$CE_MenuBarEmptyArea$$$CE_ToolButtonLabel$$$CE_Header$$$CE_HeaderSection$$$CE_HeaderLabel$$$CE_ToolBoxTab$$$CE_SizeGrip$$$CE_Splitter$$$CE_RubberBand$$$CE_DockWidgetTitle$$$CE_ScrollBarAddLine$$$CE_ScrollBarSubLine$$$CE_ScrollBarAddPage$$$CE_ScrollBarSubPage$$$CE_ScrollBarSlider$$$CE_ScrollBarFirst$$$CE_ScrollBarLast$$$CE_FocusFrame$$$CE_ComboBoxLabel$$$CE_ToolBar$$$CE_ToolBoxTabShape$$$CE_ToolBoxTabLabel$$$CE_HeaderEmptyArea$$$CE_ColumnViewGrip$$$CE_ItemViewItem$$$CE_ShapedFrame$$$CE_CustomBase -->
<h3 class="fn" id="ControlElement-enum"><a name="ControlElement-enum"></a>enum QStyle::<span class="name">ControlElement</span></h3>
<p>This enum represents a control element. A control element is a part of a widget that performs some action or displays information to the user.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::CE_PushButton</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">A <a href="qpushbutton.html">QPushButton</a>, draws CE_PushButtonBevel, CE_PushButtonLabel and <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_PushButtonBevel</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The bevel and default indicator of a <a href="qpushbutton.html">QPushButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_PushButtonLabel</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The label (an icon with text or pixmap) of a <a href="qpushbutton.html">QPushButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_DockWidgetTitle</code></td><td class="topAlign tblval"><code>30</code></td><td class="topAlign">Dock window title.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_Splitter</code></td><td class="topAlign tblval"><code>28</code></td><td class="topAlign">Splitter handle; see also <a href="qsplitter.html">QSplitter</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_CheckBox</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A <a href="qcheckbox.html">QCheckBox</a>, draws a <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorCheckBox</a>, a CE_CheckBoxLabel and a <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_CheckBoxLabel</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The label (text or pixmap) of a <a href="qcheckbox.html">QCheckBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_RadioButton</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">A <a href="qradiobutton.html">QRadioButton</a>, draws a <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorRadioButton</a>, a CE_RadioButtonLabel and a <a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_RadioButtonLabel</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The label (text or pixmap) of a <a href="qradiobutton.html">QRadioButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_TabBarTab</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The tab and label within a <a href="qtabbar.html">QTabBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_TabBarTabShape</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The tab shape within a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_TabBarTabLabel</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">The label within a tab.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ProgressBar</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">A <a href="qprogressbar.html">QProgressBar</a>, draws CE_ProgressBarGroove, CE_ProgressBarContents and CE_ProgressBarLabel.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ProgressBarGroove</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">The groove where the progress indicator is drawn in a <a href="qprogressbar.html">QProgressBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ProgressBarContents</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">The progress indicator of a <a href="qprogressbar.html">QProgressBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ProgressBarLabel</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">The text label of a <a href="qprogressbar.html">QProgressBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ToolButtonLabel</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">A tool button's label.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuBarItem</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">A menu item in a <a href="qmenubar.html">QMenuBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuBarEmptyArea</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">The empty area of a <a href="qmenubar.html">QMenuBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuItem</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">A menu item in a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuScroller</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">Scrolling areas in a <a href="qmenu.html">QMenu</a> when the style supports scrolling.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuTearoff</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">A menu item representing the tear off section of a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuEmptyArea</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">The area in a menu without menu items.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuHMargin</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">The horizontal extra space on the left/right of a menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_MenuVMargin</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">The vertical extra space on the top/bottom of a menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ToolBoxTab</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">The toolbox's tab and label within a <a href="qtoolbox.html">QToolBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_SizeGrip</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Window resize handle; see also <a href="qsizegrip.html">QSizeGrip</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_Header</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">A header.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_HeaderSection</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">A header section.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_HeaderLabel</code></td><td class="topAlign tblval"><code>25</code></td><td class="topAlign">The header's label.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarAddLine</code></td><td class="topAlign tblval"><code>31</code></td><td class="topAlign">Scroll bar line increase indicator. (i.e&#x2e;, scroll down); see also <a href="qscrollbar.html">QScrollBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarSubLine</code></td><td class="topAlign tblval"><code>32</code></td><td class="topAlign">Scroll bar line decrease indicator (i.e&#x2e;, scroll up).</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarAddPage</code></td><td class="topAlign tblval"><code>33</code></td><td class="topAlign">Scolllbar page increase indicator (i.e&#x2e;, page down).</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarSubPage</code></td><td class="topAlign tblval"><code>34</code></td><td class="topAlign">Scroll bar page decrease indicator (i.e&#x2e;, page up).</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarSlider</code></td><td class="topAlign tblval"><code>35</code></td><td class="topAlign">Scroll bar slider.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarFirst</code></td><td class="topAlign tblval"><code>36</code></td><td class="topAlign">Scroll bar first line indicator (i.e&#x2e;, home).</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ScrollBarLast</code></td><td class="topAlign tblval"><code>37</code></td><td class="topAlign">Scroll bar last line indicator (i.e&#x2e;, end).</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_RubberBand</code></td><td class="topAlign tblval"><code>29</code></td><td class="topAlign">Rubber band used in for example an icon view.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_FocusFrame</code></td><td class="topAlign tblval"><code>38</code></td><td class="topAlign">Focus frame that is style controlled.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ItemViewItem</code></td><td class="topAlign tblval"><code>45</code></td><td class="topAlign">An item inside an item view.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom control elements; custom values must be greater than this value.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ComboBoxLabel</code></td><td class="topAlign tblval"><code>39</code></td><td class="topAlign">The label of a non-editable <a href="qcombobox.html">QComboBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ToolBar</code></td><td class="topAlign tblval"><code>40</code></td><td class="topAlign">A toolbar like <a href="qtoolbar.html">QToolBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ToolBoxTabShape</code></td><td class="topAlign tblval"><code>41</code></td><td class="topAlign">The toolbox's tab shape.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ToolBoxTabLabel</code></td><td class="topAlign tblval"><code>42</code></td><td class="topAlign">The toolbox's tab label.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_HeaderEmptyArea</code></td><td class="topAlign tblval"><code>43</code></td><td class="topAlign">The area of a header view where there are no header sections.</td></tr>
<tr><td class="topAlign"><code>QStyle::CE_ShapedFrame</code></td><td class="topAlign tblval"><code>46</code></td><td class="topAlign">The frame with the shape specified in the <a href="qstyleoptionframe.html">QStyleOptionFrame</a>; see <a href="qframe.html">QFrame</a>.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#drawControl">drawControl</a>().</p>
<!-- @@@ControlElement -->
<!-- $$$PixelMetric$$$PM_ButtonMargin$$$PM_ButtonDefaultIndicator$$$PM_MenuButtonIndicator$$$PM_ButtonShiftHorizontal$$$PM_ButtonShiftVertical$$$PM_DefaultFrameWidth$$$PM_SpinBoxFrameWidth$$$PM_ComboBoxFrameWidth$$$PM_MaximumDragDistance$$$PM_ScrollBarExtent$$$PM_ScrollBarSliderMin$$$PM_SliderThickness$$$PM_SliderControlThickness$$$PM_SliderLength$$$PM_SliderTickmarkOffset$$$PM_SliderSpaceAvailable$$$PM_DockWidgetSeparatorExtent$$$PM_DockWidgetHandleExtent$$$PM_DockWidgetFrameWidth$$$PM_TabBarTabOverlap$$$PM_TabBarTabHSpace$$$PM_TabBarTabVSpace$$$PM_TabBarBaseHeight$$$PM_TabBarBaseOverlap$$$PM_ProgressBarChunkWidth$$$PM_SplitterWidth$$$PM_TitleBarHeight$$$PM_MenuScrollerHeight$$$PM_MenuHMargin$$$PM_MenuVMargin$$$PM_MenuPanelWidth$$$PM_MenuTearoffHeight$$$PM_MenuDesktopFrameWidth$$$PM_MenuBarPanelWidth$$$PM_MenuBarItemSpacing$$$PM_MenuBarVMargin$$$PM_MenuBarHMargin$$$PM_IndicatorWidth$$$PM_IndicatorHeight$$$PM_ExclusiveIndicatorWidth$$$PM_ExclusiveIndicatorHeight$$$PM_DialogButtonsSeparator$$$PM_DialogButtonsButtonWidth$$$PM_DialogButtonsButtonHeight$$$PM_MdiSubWindowFrameWidth$$$PM_MDIFrameWidth$$$PM_MdiSubWindowMinimizedWidth$$$PM_MDIMinimizedWidth$$$PM_HeaderMargin$$$PM_HeaderMarkSize$$$PM_HeaderGripMargin$$$PM_TabBarTabShiftHorizontal$$$PM_TabBarTabShiftVertical$$$PM_TabBarScrollButtonWidth$$$PM_ToolBarFrameWidth$$$PM_ToolBarHandleExtent$$$PM_ToolBarItemSpacing$$$PM_ToolBarItemMargin$$$PM_ToolBarSeparatorExtent$$$PM_ToolBarExtensionExtent$$$PM_SpinBoxSliderHeight$$$PM_DefaultTopLevelMargin$$$PM_DefaultChildMargin$$$PM_DefaultLayoutSpacing$$$PM_ToolBarIconSize$$$PM_ListViewIconSize$$$PM_IconViewIconSize$$$PM_SmallIconSize$$$PM_LargeIconSize$$$PM_FocusFrameVMargin$$$PM_FocusFrameHMargin$$$PM_ToolTipLabelFrameWidth$$$PM_CheckBoxLabelSpacing$$$PM_TabBarIconSize$$$PM_SizeGripSize$$$PM_DockWidgetTitleMargin$$$PM_MessageBoxIconSize$$$PM_ButtonIconSize$$$PM_DockWidgetTitleBarButtonMargin$$$PM_RadioButtonLabelSpacing$$$PM_LayoutLeftMargin$$$PM_LayoutTopMargin$$$PM_LayoutRightMargin$$$PM_LayoutBottomMargin$$$PM_LayoutHorizontalSpacing$$$PM_LayoutVerticalSpacing$$$PM_TabBar_ScrollButtonOverlap$$$PM_TextCursorWidth$$$PM_TabCloseIndicatorWidth$$$PM_TabCloseIndicatorHeight$$$PM_ScrollView_ScrollBarSpacing$$$PM_ScrollView_ScrollBarOverlap$$$PM_SubMenuOverlap$$$PM_TreeViewIndentation$$$PM_HeaderDefaultSectionSizeHorizontal$$$PM_HeaderDefaultSectionSizeVertical$$$PM_TitleBarButtonIconSize$$$PM_TitleBarButtonSize$$$PM_CustomBase -->
<h3 class="fn" id="PixelMetric-enum"><a name="PixelMetric-enum"></a>enum QStyle::<span class="name">PixelMetric</span></h3>
<p>This enum describes the various available pixel metrics. A pixel metric is a style dependent size represented by a single pixel value.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::PM_ButtonMargin</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Amount of whitespace between push button labels and the frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DockWidgetTitleBarButtonMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Amount of whitespace between dock widget's title bar button labels and the frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ButtonDefaultIndicator</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Width of the default-button indicator frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuButtonIndicator</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Width of the menu button indicator proportional to the widget height.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ButtonShiftHorizontal</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Horizontal contents shift of a button when the button is down.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ButtonShiftVertical</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Vertical contents shift of a button when the button is down.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DefaultFrameWidth</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Default frame width (usually 2).</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SpinBoxFrameWidth</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Frame width of a spin box, defaults to PM_DefaultFrameWidth.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ComboBoxFrameWidth</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Frame width of a combo box, defaults to PM_DefaultFrameWidth.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MDIFrameWidth</code></td><td class="topAlign tblval"><code>PM_MdiSubWindowFrameWidth</code></td><td class="topAlign">Obsolete. Use PM_MdiSubWindowFrameWidth instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MdiSubWindowFrameWidth</code></td><td class="topAlign tblval"><code>44</code></td><td class="topAlign">Frame width of an MDI window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MDIMinimizedWidth</code></td><td class="topAlign tblval"><code>PM_MdiSubWindowMinimizedWidth</code></td><td class="topAlign">Obsolete. Use PM_MdiSubWindowMinimizedWidth instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MdiSubWindowMinimizedWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">Width of a minimized MDI window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutLeftMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#setContentsMargins">left margin</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutTopMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#setContentsMargins">top margin</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutRightMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#setContentsMargins">right margin</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutBottomMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#setContentsMargins">bottom margin</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutHorizontalSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#spacing-prop">horizontal spacing</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LayoutVerticalSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default <a href="qlayout.html#spacing-prop">vertical spacing</a> for a <a href="qlayout.html">QLayout</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MaximumDragDistance</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">The maximum allowed distance between the mouse and a scrollbar when dragging. Exceeding the specified distance will cause the slider to jump back to the original position; a value of -1 disables this behavior.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ScrollBarExtent</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Width of a vertical scroll bar and the height of a horizontal scroll bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ScrollBarSliderMin</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">The minimum height of a vertical scroll bar's slider and the minimum width of a horizontal scroll bar's slider.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SliderThickness</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">Total slider thickness.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SliderControlThickness</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">Thickness of the slider handle.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SliderLength</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">Length of the slider.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SliderTickmarkOffset</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">The offset between the tickmarks and the slider.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SliderSpaceAvailable</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">The available space for the slider to move.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DockWidgetSeparatorExtent</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">Width of a separator in a horizontal dock window and the height of a separator in a vertical dock window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DockWidgetHandleExtent</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">Width of the handle in a horizontal dock window and the height of the handle in a vertical dock window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DockWidgetFrameWidth</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">Frame width of a dock window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DockWidgetTitleMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Margin of the dock window title.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuBarPanelWidth</code></td><td class="topAlign tblval"><code>33</code></td><td class="topAlign">Frame width of a menu bar, defaults to PM_DefaultFrameWidth.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuBarItemSpacing</code></td><td class="topAlign tblval"><code>34</code></td><td class="topAlign">Spacing between menu bar items.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuBarHMargin</code></td><td class="topAlign tblval"><code>36</code></td><td class="topAlign">Spacing between menu bar items and left/right of bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuBarVMargin</code></td><td class="topAlign tblval"><code>35</code></td><td class="topAlign">Spacing between menu bar items and top/bottom of bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarFrameWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">Width of the frame around toolbars.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarHandleExtent</code></td><td class="topAlign tblval">?</td><td class="topAlign">Width of a toolbar handle in a horizontal toolbar and the height of the handle in a vertical toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarItemMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Spacing between the toolbar frame and the items.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarItemSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">Spacing between toolbar items.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarSeparatorExtent</code></td><td class="topAlign tblval">?</td><td class="topAlign">Width of a toolbar separator in a horizontal toolbar and the height of a separator in a vertical toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarExtensionExtent</code></td><td class="topAlign tblval">?</td><td class="topAlign">Width of a toolbar extension button in a horizontal toolbar and the height of the button in a vertical toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarTabOverlap</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">Number of pixels the tabs should overlap. (Currently only used in styles, not inside of <a href="qtabbar.html">QTabBar</a>)</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarTabHSpace</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">Extra space added to the tab width.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarTabVSpace</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">Extra space added to the tab height.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarBaseHeight</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">Height of the area between the tab bar and the tab pages.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarBaseOverlap</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">Number of pixels the tab bar overlaps the tab bar base.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarScrollButtonWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">&nbsp;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarTabShiftHorizontal</code></td><td class="topAlign tblval">?</td><td class="topAlign">Horizontal pixel shift when a tab is selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarTabShiftVertical</code></td><td class="topAlign tblval">?</td><td class="topAlign">Vertical pixel shift when a tab is selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ProgressBarChunkWidth</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">Width of a chunk in a progress bar indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SplitterWidth</code></td><td class="topAlign tblval"><code>25</code></td><td class="topAlign">Width of a splitter.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TitleBarHeight</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">Height of the title bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_IndicatorWidth</code></td><td class="topAlign tblval"><code>37</code></td><td class="topAlign">Width of a check box indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_IndicatorHeight</code></td><td class="topAlign tblval"><code>38</code></td><td class="topAlign">Height of a checkbox indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ExclusiveIndicatorWidth</code></td><td class="topAlign tblval"><code>39</code></td><td class="topAlign">Width of a radio button indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ExclusiveIndicatorHeight</code></td><td class="topAlign tblval"><code>40</code></td><td class="topAlign">Height of a radio button indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuPanelWidth</code></td><td class="topAlign tblval"><code>30</code></td><td class="topAlign">Border width (applied on all sides) for a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuHMargin</code></td><td class="topAlign tblval"><code>28</code></td><td class="topAlign">Additional border (used on left and right) for a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuVMargin</code></td><td class="topAlign tblval"><code>29</code></td><td class="topAlign">Additional border (used for bottom and top) for a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuScrollerHeight</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Height of the scroller area in a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuTearoffHeight</code></td><td class="topAlign tblval"><code>31</code></td><td class="topAlign">Height of a tear off area in a <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MenuDesktopFrameWidth</code></td><td class="topAlign tblval"><code>32</code></td><td class="topAlign">The frame width for the menu on the desktop.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_HeaderMarkSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of the sort indicator in a header.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_HeaderGripMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of the resize grip in a header.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_HeaderMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of the margin between the sort indicator and the text.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SpinBoxSliderHeight</code></td><td class="topAlign tblval">?</td><td class="topAlign">The height of the optional spin box slider.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolBarIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default tool bar icon size</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SmallIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default small icon size</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_LargeIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default large icon size</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_FocusFrameHMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Horizontal margin that the focus frame will outset the widget by.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_FocusFrameVMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Vertical margin that the focus frame will outset the widget by.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_IconViewIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default size for icons in an icon view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ListViewIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default size for icons in a list view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ToolTipLabelFrameWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">The frame width for a tool tip label.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_CheckBoxLabelSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">The spacing between a check box indicator and its label.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_RadioButtonLabelSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">The spacing between a radio button indicator and its label.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBarIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default icon size for a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SizeGripSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of a size grip.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_MessageBoxIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of the standard icons in a message box</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ButtonIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default size of button icons</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TextCursorWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">The width of the cursor in a line edit or text edit</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabBar_ScrollButtonOverlap</code></td><td class="topAlign tblval">?</td><td class="topAlign">The distance between the left and right buttons in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabCloseIndicatorWidth</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default width of a close button on a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TabCloseIndicatorHeight</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default height of a close button on a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ScrollView_ScrollBarSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">Distance between frame and scrollbar with <a href="qstyle.html#StyleHint-enum">SH_ScrollView_FrameOnlyAroundContents</a> set.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_ScrollView_ScrollBarOverlap</code></td><td class="topAlign tblval">?</td><td class="topAlign">Overlap between scroll bars and scroll content</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_SubMenuOverlap</code></td><td class="topAlign tblval">?</td><td class="topAlign">The horizontal overlap between a submenu and its parent.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TreeViewIndentation</code></td><td class="topAlign tblval">?</td><td class="topAlign">The indentation of items in a tree view. This enum value has been introduced in Qt 5.4&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_HeaderDefaultSectionSizeHorizontal</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default size of sections in a horizontal header. This enum value has been introduced in Qt 5.5&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_HeaderDefaultSectionSizeVertical</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default size of sections in a vertical header. This enum value has been introduced in Qt 5.5&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TitleBarButtonIconSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of button icons on a title bar. This enum value has been introduced in Qt 5.8&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_TitleBarButtonSize</code></td><td class="topAlign tblval">?</td><td class="topAlign">The size of buttons on a title bar. This enum value has been introduced in Qt 5.8&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom pixel metrics. Custom values must be greater than this value.</td></tr>
</table></div>
<p>The following values are obsolete:</p>
<div class="table"><table class="valuelist"><tr valign="top" class="even"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::PM_DefaultTopLevelMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Use PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DefaultChildMargin</code></td><td class="topAlign tblval">?</td><td class="topAlign">Use PM_LayoutLeftMargin, PM_LayoutTopMargin, PM_LayoutRightMargin, and PM_LayoutBottomMargin instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PM_DefaultLayoutSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">Use PM_LayoutHorizontalSpacing and PM_LayoutVerticalSpacing instead.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#pixelMetric">pixelMetric</a>().</p>
<!-- @@@PixelMetric -->
<!-- $$$PrimitiveElement$$$PE_Frame$$$PE_FrameDefaultButton$$$PE_FrameDockWidget$$$PE_FrameFocusRect$$$PE_FrameGroupBox$$$PE_FrameLineEdit$$$PE_FrameMenu$$$PE_FrameStatusBar$$$PE_FrameStatusBarItem$$$PE_FrameTabWidget$$$PE_FrameWindow$$$PE_FrameButtonBevel$$$PE_FrameButtonTool$$$PE_FrameTabBarBase$$$PE_PanelButtonCommand$$$PE_PanelButtonBevel$$$PE_PanelButtonTool$$$PE_PanelMenuBar$$$PE_PanelToolBar$$$PE_PanelLineEdit$$$PE_IndicatorArrowDown$$$PE_IndicatorArrowLeft$$$PE_IndicatorArrowRight$$$PE_IndicatorArrowUp$$$PE_IndicatorBranch$$$PE_IndicatorButtonDropDown$$$PE_IndicatorViewItemCheck$$$PE_IndicatorItemViewItemCheck$$$PE_IndicatorCheckBox$$$PE_IndicatorDockWidgetResizeHandle$$$PE_IndicatorHeaderArrow$$$PE_IndicatorMenuCheckMark$$$PE_IndicatorProgressChunk$$$PE_IndicatorRadioButton$$$PE_IndicatorSpinDown$$$PE_IndicatorSpinMinus$$$PE_IndicatorSpinPlus$$$PE_IndicatorSpinUp$$$PE_IndicatorToolBarHandle$$$PE_IndicatorToolBarSeparator$$$PE_PanelTipLabel$$$PE_IndicatorTabTear$$$PE_IndicatorTabTearLeft$$$PE_PanelScrollAreaCorner$$$PE_Widget$$$PE_IndicatorColumnViewArrow$$$PE_IndicatorItemViewItemDrop$$$PE_PanelItemViewItem$$$PE_PanelItemViewRow$$$PE_PanelStatusBar$$$PE_IndicatorTabClose$$$PE_PanelMenu$$$PE_IndicatorTabTearRight$$$PE_CustomBase -->
<h3 class="fn" id="PrimitiveElement-enum"><a name="PrimitiveElement-enum"></a>enum QStyle::<span class="name">PrimitiveElement</span></h3>
<p>This enum describes the various primitive elements. A primitive element is a common GUI element, such as a checkbox indicator or button bevel.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameStatusBar</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Obsolete. Use PE_FrameStatusBarItem instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelButtonCommand</code></td><td class="topAlign tblval">?</td><td class="topAlign">Button used to initiate an action, for example, a <a href="qpushbutton.html">QPushButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameDefaultButton</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">This frame around a default button, e.g&#x2e; in a dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelButtonBevel</code></td><td class="topAlign tblval">?</td><td class="topAlign">Generic panel with a button bevel.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelButtonTool</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel for a Tool button, used with <a href="qtoolbutton.html">QToolButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelLineEdit</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel for a <a href="qlineedit.html">QLineEdit</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorButtonDropDown</code></td><td class="topAlign tblval">?</td><td class="topAlign">Indicator for a drop down button, for example, a tool button that displays a menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameFocusRect</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Generic focus indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorArrowUp</code></td><td class="topAlign tblval">?</td><td class="topAlign">Generic Up arrow.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorArrowDown</code></td><td class="topAlign tblval">?</td><td class="topAlign">Generic Down arrow.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorArrowRight</code></td><td class="topAlign tblval">?</td><td class="topAlign">Generic Right arrow.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorArrowLeft</code></td><td class="topAlign tblval">?</td><td class="topAlign">Generic Left arrow.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorSpinUp</code></td><td class="topAlign tblval">?</td><td class="topAlign">Up symbol for a spin widget, for example a <a href="qspinbox.html">QSpinBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorSpinDown</code></td><td class="topAlign tblval">?</td><td class="topAlign">Down symbol for a spin widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorSpinPlus</code></td><td class="topAlign tblval">?</td><td class="topAlign">Increase symbol for a spin widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorSpinMinus</code></td><td class="topAlign tblval">?</td><td class="topAlign">Decrease symbol for a spin widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorItemViewItemCheck</code></td><td class="topAlign tblval"><code>PE_IndicatorViewItemCheck</code></td><td class="topAlign">On/off indicator for a view item.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorCheckBox</code></td><td class="topAlign tblval">?</td><td class="topAlign">On/off indicator, for example, a <a href="qcheckbox.html">QCheckBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorRadioButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Exclusive on/off indicator, for example, a <a href="qradiobutton.html">QRadioButton</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorDockWidgetResizeHandle</code></td><td class="topAlign tblval">?</td><td class="topAlign">Resize handle for dock windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_Frame</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Generic frame</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameMenu</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Frame for popup windows/menus; see also <a href="qmenu.html">QMenu</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelMenuBar</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel for menu bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelScrollAreaCorner</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel at the bottom-right (or bottom-left) corner of a scroll area.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameDockWidget</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Panel frame for dock windows and toolbars.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameTabWidget</code></td><td class="topAlign tblval">?</td><td class="topAlign">Frame for tab widgets.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameLineEdit</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Panel frame for line edits.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameGroupBox</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Panel frame around group boxes.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameButtonBevel</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel frame for a button bevel.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameButtonTool</code></td><td class="topAlign tblval">?</td><td class="topAlign">Panel frame for a tool button.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorHeaderArrow</code></td><td class="topAlign tblval">?</td><td class="topAlign">Arrow used to indicate sorting on a list or table header.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameStatusBarItem</code></td><td class="topAlign tblval"><code>PE_FrameStatusBar</code></td><td class="topAlign">Frame for an item of a status bar; see also <a href="qstatusbar.html">QStatusBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameWindow</code></td><td class="topAlign tblval">?</td><td class="topAlign">Frame around a MDI window or a docking window.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorMenuCheckMark</code></td><td class="topAlign tblval">?</td><td class="topAlign">Check mark used in a menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorProgressChunk</code></td><td class="topAlign tblval">?</td><td class="topAlign">Section of a progress bar indicator; see also <a href="qprogressbar.html">QProgressBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorBranch</code></td><td class="topAlign tblval">?</td><td class="topAlign">Lines used to represent the branch of a tree in a tree view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorToolBarHandle</code></td><td class="topAlign tblval">?</td><td class="topAlign">The handle of a toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorToolBarSeparator</code></td><td class="topAlign tblval">?</td><td class="topAlign">The separator in a toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelToolBar</code></td><td class="topAlign tblval">?</td><td class="topAlign">The panel for a toolbar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelTipLabel</code></td><td class="topAlign tblval">?</td><td class="topAlign">The panel for a tip label.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_FrameTabBarBase</code></td><td class="topAlign tblval">?</td><td class="topAlign">The frame that is drawn for a tab bar, ususally drawn for a tab bar that isn't part of a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorTabTear</code></td><td class="topAlign tblval">?</td><td class="topAlign">Deprecated. Use PE_IndicatorTabTearLeft instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorTabTearLeft</code></td><td class="topAlign tblval"><code>PE_IndicatorTabTear</code></td><td class="topAlign">An indicator that a tab is partially scrolled out on the left side of the visible tab bar when there are many tabs.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorTabTearRight</code></td><td class="topAlign tblval">?</td><td class="topAlign">An indicator that a tab is partially scrolled out on the right side of the visible tab bar when there are many tabs.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorColumnViewArrow</code></td><td class="topAlign tblval">?</td><td class="topAlign">An arrow in a <a href="qcolumnview.html">QColumnView</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_Widget</code></td><td class="topAlign tblval">?</td><td class="topAlign">A plain <a href="qwidget.html">QWidget</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_CustomBase</code></td><td class="topAlign tblval"><code>0xf000000</code></td><td class="topAlign">Base value for custom primitive elements. All values above this are reserved for custom use. Custom values must be greater than this value.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorItemViewItemDrop</code></td><td class="topAlign tblval">?</td><td class="topAlign">An indicator that is drawn to show where an item in an item view is about to be dropped during a drag-and-drop operation in an item view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelItemViewItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">The background for an item in an item view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelItemViewRow</code></td><td class="topAlign tblval">?</td><td class="topAlign">The background of a row in an item view.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelStatusBar</code></td><td class="topAlign tblval">?</td><td class="topAlign">The panel for a status bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_IndicatorTabClose</code></td><td class="topAlign tblval">?</td><td class="topAlign">The close button on a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::PE_PanelMenu</code></td><td class="topAlign tblval">?</td><td class="topAlign">The panel for a menu.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#drawPrimitive">drawPrimitive</a>().</p>
<!-- @@@PrimitiveElement -->
<!-- $$$RequestSoftwareInputPanel$$$RSIP_OnMouseClickAndAlreadyFocused$$$RSIP_OnMouseClick -->
<h3 class="fn" id="RequestSoftwareInputPanel-enum"><a name="RequestSoftwareInputPanel-enum"></a>enum QStyle::<span class="name">RequestSoftwareInputPanel</span></h3>
<p>This enum describes under what circumstances a software input panel will be requested by input capable widgets.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::RSIP_OnMouseClickAndAlreadyFocused</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Requests an input panel if the user clicks on the widget, but only if it is already focused.</td></tr>
<tr><td class="topAlign"><code>QStyle::RSIP_OnMouseClick</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Requests an input panel if the user clicks on the widget.</td></tr>
</table></div>
<p><b>See also </b><a href="../qtgui/qinputmethod.html">QInputMethod</a>.</p>
<!-- @@@RequestSoftwareInputPanel -->
<!-- $$$StandardPixmap$$$SP_TitleBarMenuButton$$$SP_TitleBarMinButton$$$SP_TitleBarMaxButton$$$SP_TitleBarCloseButton$$$SP_TitleBarNormalButton$$$SP_TitleBarShadeButton$$$SP_TitleBarUnshadeButton$$$SP_TitleBarContextHelpButton$$$SP_DockWidgetCloseButton$$$SP_MessageBoxInformation$$$SP_MessageBoxWarning$$$SP_MessageBoxCritical$$$SP_MessageBoxQuestion$$$SP_DesktopIcon$$$SP_TrashIcon$$$SP_ComputerIcon$$$SP_DriveFDIcon$$$SP_DriveHDIcon$$$SP_DriveCDIcon$$$SP_DriveDVDIcon$$$SP_DriveNetIcon$$$SP_DirOpenIcon$$$SP_DirClosedIcon$$$SP_DirLinkIcon$$$SP_DirLinkOpenIcon$$$SP_FileIcon$$$SP_FileLinkIcon$$$SP_ToolBarHorizontalExtensionButton$$$SP_ToolBarVerticalExtensionButton$$$SP_FileDialogStart$$$SP_FileDialogEnd$$$SP_FileDialogToParent$$$SP_FileDialogNewFolder$$$SP_FileDialogDetailedView$$$SP_FileDialogInfoView$$$SP_FileDialogContentsView$$$SP_FileDialogListView$$$SP_FileDialogBack$$$SP_DirIcon$$$SP_DialogOkButton$$$SP_DialogCancelButton$$$SP_DialogHelpButton$$$SP_DialogOpenButton$$$SP_DialogSaveButton$$$SP_DialogCloseButton$$$SP_DialogApplyButton$$$SP_DialogResetButton$$$SP_DialogDiscardButton$$$SP_DialogYesButton$$$SP_DialogNoButton$$$SP_ArrowUp$$$SP_ArrowDown$$$SP_ArrowLeft$$$SP_ArrowRight$$$SP_ArrowBack$$$SP_ArrowForward$$$SP_DirHomeIcon$$$SP_CommandLink$$$SP_VistaShield$$$SP_BrowserReload$$$SP_BrowserStop$$$SP_MediaPlay$$$SP_MediaStop$$$SP_MediaPause$$$SP_MediaSkipForward$$$SP_MediaSkipBackward$$$SP_MediaSeekForward$$$SP_MediaSeekBackward$$$SP_MediaVolume$$$SP_MediaVolumeMuted$$$SP_LineEditClearButton$$$SP_CustomBase -->
<h3 class="fn" id="StandardPixmap-enum"><a name="StandardPixmap-enum"></a>enum QStyle::<span class="name">StandardPixmap</span></h3>
<p>This enum describes the available standard pixmaps. A standard pixmap is a pixmap that can follow some existing GUI style or guideline.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarMinButton</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Minimize button on title bars (e.g&#x2e;, in <a href="qmdisubwindow.html">QMdiSubWindow</a>).</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarMenuButton</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Menu button on a title bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarMaxButton</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Maximize button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarCloseButton</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Close button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarNormalButton</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Normal (restore) button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarShadeButton</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Shade button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarUnshadeButton</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Unshade button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TitleBarContextHelpButton</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">The Context help button on title bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MessageBoxInformation</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">The &quot;information&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MessageBoxWarning</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">The &quot;warning&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MessageBoxCritical</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">The &quot;critical&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MessageBoxQuestion</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">The &quot;question&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DesktopIcon</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">The &quot;desktop&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_TrashIcon</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">The &quot;trash&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ComputerIcon</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">The &quot;My computer&quot; icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DriveFDIcon</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">The floppy icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DriveHDIcon</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">The harddrive icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DriveCDIcon</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">The CD icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DriveDVDIcon</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">The DVD icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DriveNetIcon</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">The network icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirHomeIcon</code></td><td class="topAlign tblval"><code>56</code></td><td class="topAlign">The home directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirOpenIcon</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">The open directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirClosedIcon</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">The closed directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirIcon</code></td><td class="topAlign tblval"><code>38</code></td><td class="topAlign">The directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirLinkIcon</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">The link to directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DirLinkOpenIcon</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">The link to open directory icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileIcon</code></td><td class="topAlign tblval"><code>25</code></td><td class="topAlign">The file icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileLinkIcon</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">The link to file icon.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogStart</code></td><td class="topAlign tblval"><code>29</code></td><td class="topAlign">The &quot;start&quot; icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogEnd</code></td><td class="topAlign tblval"><code>30</code></td><td class="topAlign">The &quot;end&quot; icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogToParent</code></td><td class="topAlign tblval"><code>31</code></td><td class="topAlign">The &quot;parent directory&quot; icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogNewFolder</code></td><td class="topAlign tblval"><code>32</code></td><td class="topAlign">The &quot;create new folder&quot; icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogDetailedView</code></td><td class="topAlign tblval"><code>33</code></td><td class="topAlign">The detailed view icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogInfoView</code></td><td class="topAlign tblval"><code>34</code></td><td class="topAlign">The file info icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogContentsView</code></td><td class="topAlign tblval"><code>35</code></td><td class="topAlign">The contents view icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogListView</code></td><td class="topAlign tblval"><code>36</code></td><td class="topAlign">The list view icon in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_FileDialogBack</code></td><td class="topAlign tblval"><code>37</code></td><td class="topAlign">The back arrow in a file dialog.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DockWidgetCloseButton</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Close button on dock windows (see also <a href="qdockwidget.html">QDockWidget</a>).</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ToolBarHorizontalExtensionButton</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Extension button for horizontal toolbars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ToolBarVerticalExtensionButton</code></td><td class="topAlign tblval"><code>28</code></td><td class="topAlign">Extension button for vertical toolbars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogOkButton</code></td><td class="topAlign tblval"><code>39</code></td><td class="topAlign">Icon for a standard OK button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogCancelButton</code></td><td class="topAlign tblval"><code>40</code></td><td class="topAlign">Icon for a standard Cancel button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogHelpButton</code></td><td class="topAlign tblval"><code>41</code></td><td class="topAlign">Icon for a standard Help button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogOpenButton</code></td><td class="topAlign tblval"><code>42</code></td><td class="topAlign">Icon for a standard Open button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogSaveButton</code></td><td class="topAlign tblval"><code>43</code></td><td class="topAlign">Icon for a standard Save button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogCloseButton</code></td><td class="topAlign tblval"><code>44</code></td><td class="topAlign">Icon for a standard Close button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogApplyButton</code></td><td class="topAlign tblval"><code>45</code></td><td class="topAlign">Icon for a standard Apply button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogResetButton</code></td><td class="topAlign tblval"><code>46</code></td><td class="topAlign">Icon for a standard Reset button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogDiscardButton</code></td><td class="topAlign tblval"><code>47</code></td><td class="topAlign">Icon for a standard Discard button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogYesButton</code></td><td class="topAlign tblval"><code>48</code></td><td class="topAlign">Icon for a standard Yes button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_DialogNoButton</code></td><td class="topAlign tblval"><code>49</code></td><td class="topAlign">Icon for a standard No button in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowUp</code></td><td class="topAlign tblval"><code>50</code></td><td class="topAlign">Icon arrow pointing up.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowDown</code></td><td class="topAlign tblval"><code>51</code></td><td class="topAlign">Icon arrow pointing down.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowLeft</code></td><td class="topAlign tblval"><code>52</code></td><td class="topAlign">Icon arrow pointing left.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowRight</code></td><td class="topAlign tblval"><code>53</code></td><td class="topAlign">Icon arrow pointing right.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowBack</code></td><td class="topAlign tblval"><code>54</code></td><td class="topAlign">Equivalent to SP_ArrowLeft when the current layout direction is <a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LeftToRight</a>, otherwise SP_ArrowRight.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_ArrowForward</code></td><td class="topAlign tblval"><code>55</code></td><td class="topAlign">Equivalent to SP_ArrowRight when the current layout direction is <a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LeftToRight</a>, otherwise SP_ArrowLeft.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_CommandLink</code></td><td class="topAlign tblval"><code>57</code></td><td class="topAlign">Icon used to indicate a Vista style command link glyph.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_VistaShield</code></td><td class="topAlign tblval"><code>58</code></td><td class="topAlign">Icon used to indicate UAC prompts on Windows Vista. This will return a null pixmap or icon on all other platforms.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_BrowserReload</code></td><td class="topAlign tblval"><code>59</code></td><td class="topAlign">Icon indicating that the current page should be reloaded.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_BrowserStop</code></td><td class="topAlign tblval"><code>60</code></td><td class="topAlign">Icon indicating that the page loading should stop.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaPlay</code></td><td class="topAlign tblval"><code>61</code></td><td class="topAlign">Icon indicating that media should begin playback.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaStop</code></td><td class="topAlign tblval"><code>62</code></td><td class="topAlign">Icon indicating that media should stop playback.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaPause</code></td><td class="topAlign tblval"><code>63</code></td><td class="topAlign">Icon indicating that media should pause playback.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaSkipForward</code></td><td class="topAlign tblval"><code>64</code></td><td class="topAlign">Icon indicating that media should skip forward.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaSkipBackward</code></td><td class="topAlign tblval"><code>65</code></td><td class="topAlign">Icon indicating that media should skip backward.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaSeekForward</code></td><td class="topAlign tblval"><code>66</code></td><td class="topAlign">Icon indicating that media should seek forward.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaSeekBackward</code></td><td class="topAlign tblval"><code>67</code></td><td class="topAlign">Icon indicating that media should seek backward.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaVolume</code></td><td class="topAlign tblval"><code>68</code></td><td class="topAlign">Icon indicating a volume control.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_MediaVolumeMuted</code></td><td class="topAlign tblval"><code>69</code></td><td class="topAlign">Icon indicating a muted volume control.</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_LineEditClearButton</code></td><td class="topAlign tblval"><code>70</code></td><td class="topAlign">Icon for a standard clear button in a <a href="qlineedit.html">QLineEdit</a>. This enum value was added in Qt 5.2&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::SP_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom standard pixmaps; custom values must be greater than this value.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#standardIcon">standardIcon</a>().</p>
<!-- @@@StandardPixmap -->
<!-- $$$StateFlag$$$State_None$$$State_Enabled$$$State_Raised$$$State_Sunken$$$State_Off$$$State_NoChange$$$State_On$$$State_DownArrow$$$State_Horizontal$$$State_HasFocus$$$State_Top$$$State_Bottom$$$State_FocusAtBorder$$$State_AutoRaise$$$State_MouseOver$$$State_UpArrow$$$State_Selected$$$State_Active$$$State_Window$$$State_Open$$$State_Children$$$State_Item$$$State_Sibling$$$State_Editing$$$State_KeyboardFocusChange$$$State_HasEditFocus$$$State_ReadOnly$$$State_Small$$$State_Mini -->
<h3 class="flags" id="StateFlag-enum"><a name="StateFlag-enum"></a>enum QStyle::<span class="name">StateFlag</span><br/>flags QStyle::<span class="name">State</span></h3>
<p>This enum describes flags that are used when drawing primitive elements.</p>
<p>Note that not all primitives use all of these flags, and that the flags may mean different things to different items.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::State_None</code></td><td class="topAlign tblval"><code>0x00000000</code></td><td class="topAlign">Indicates that the widget does not have a state.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Active</code></td><td class="topAlign tblval"><code>0x00010000</code></td><td class="topAlign">Indicates that the widget is active.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_AutoRaise</code></td><td class="topAlign tblval"><code>0x00001000</code></td><td class="topAlign">Used to indicate if auto-raise appearance should be used on a tool button.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Children</code></td><td class="topAlign tblval"><code>0x00080000</code></td><td class="topAlign">Used to indicate if an item view branch has children.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_DownArrow</code></td><td class="topAlign tblval"><code>0x00000040</code></td><td class="topAlign">Used to indicate if a down arrow should be visible on the widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Editing</code></td><td class="topAlign tblval"><code>0x00400000</code></td><td class="topAlign">Used to indicate if an editor is opened on the widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Enabled</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Used to indicate if the widget is enabled.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_HasEditFocus</code></td><td class="topAlign tblval"><code>0x01000000</code></td><td class="topAlign">Used to indicate if the widget currently has edit focus.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_HasFocus</code></td><td class="topAlign tblval"><code>0x00000100</code></td><td class="topAlign">Used to indicate if the widget has focus.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Horizontal</code></td><td class="topAlign tblval"><code>0x00000080</code></td><td class="topAlign">Used to indicate if the widget is laid out horizontally, for example. a tool bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_KeyboardFocusChange</code></td><td class="topAlign tblval"><code>0x00800000</code></td><td class="topAlign">Used to indicate if the focus was changed with the keyboard, e.g&#x2e;, tab, backtab or shortcut.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_MouseOver</code></td><td class="topAlign tblval"><code>0x00002000</code></td><td class="topAlign">Used to indicate if the widget is under the mouse.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_NoChange</code></td><td class="topAlign tblval"><code>0x00000010</code></td><td class="topAlign">Used to indicate a tri-state checkbox.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Off</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">Used to indicate if the widget is not checked.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_On</code></td><td class="topAlign tblval"><code>0x00000020</code></td><td class="topAlign">Used to indicate if the widget is checked.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Raised</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Used to indicate if a button is raised.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_ReadOnly</code></td><td class="topAlign tblval"><code>0x02000000</code></td><td class="topAlign">Used to indicate if a widget is read-only.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Selected</code></td><td class="topAlign tblval"><code>0x00008000</code></td><td class="topAlign">Used to indicate if a widget is selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Item</code></td><td class="topAlign tblval"><code>0x00100000</code></td><td class="topAlign">Used by item views to indicate if a horizontal branch should be drawn.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Open</code></td><td class="topAlign tblval"><code>0x00040000</code></td><td class="topAlign">Used by item views to indicate if the tree branch is open.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Sibling</code></td><td class="topAlign tblval"><code>0x00200000</code></td><td class="topAlign">Used by item views to indicate if a vertical line needs to be drawn (for siblings).</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Sunken</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Used to indicate if the widget is sunken or pressed.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_UpArrow</code></td><td class="topAlign tblval"><code>0x00004000</code></td><td class="topAlign">Used to indicate if an up arrow should be visible on the widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Mini</code></td><td class="topAlign tblval"><code>0x08000000</code></td><td class="topAlign">Used to indicate a mini style Mac widget or button.</td></tr>
<tr><td class="topAlign"><code>QStyle::State_Small</code></td><td class="topAlign tblval"><code>0x04000000</code></td><td class="topAlign">Used to indicate a small style Mac widget or button.</td></tr>
</table></div>
<p>The State type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;StateFlag&gt;. It stores an OR combination of StateFlag values.</p>
<p><b>See also </b><a href="qstyle.html#drawPrimitive">drawPrimitive</a>().</p>
<!-- @@@StateFlag -->
<!-- $$$StyleHint$$$SH_EtchDisabledText$$$SH_DitherDisabledText$$$SH_ScrollBar_MiddleClickAbsolutePosition$$$SH_ScrollBar_ScrollWhenPointerLeavesControl$$$SH_TabBar_SelectMouseType$$$SH_TabBar_Alignment$$$SH_Header_ArrowAlignment$$$SH_Slider_SnapToValue$$$SH_Slider_SloppyKeyEvents$$$SH_ProgressDialog_CenterCancelButton$$$SH_ProgressDialog_TextLabelAlignment$$$SH_PrintDialog_RightAlignButtons$$$SH_MainWindow_SpaceBelowMenuBar$$$SH_FontDialog_SelectAssociatedText$$$SH_Menu_AllowActiveAndDisabled$$$SH_Menu_SpaceActivatesItem$$$SH_Menu_SubMenuPopupDelay$$$SH_ScrollView_FrameOnlyAroundContents$$$SH_MenuBar_AltKeyNavigation$$$SH_ComboBox_ListMouseTracking$$$SH_Menu_MouseTracking$$$SH_MenuBar_MouseTracking$$$SH_ItemView_ChangeHighlightOnFocus$$$SH_Widget_ShareActivation$$$SH_Workspace_FillSpaceOnMaximize$$$SH_ComboBox_Popup$$$SH_TitleBar_NoBorder$$$SH_Slider_StopMouseOverSlider$$$SH_ScrollBar_StopMouseOverSlider$$$SH_BlinkCursorWhenTextSelected$$$SH_RichText_FullWidthSelection$$$SH_Menu_Scrollable$$$SH_GroupBox_TextLabelVerticalAlignment$$$SH_GroupBox_TextLabelColor$$$SH_Menu_SloppySubMenus$$$SH_Table_GridLineColor$$$SH_LineEdit_PasswordCharacter$$$SH_DialogButtons_DefaultButton$$$SH_ToolBox_SelectedPageTitleBold$$$SH_TabBar_PreferNoArrows$$$SH_ScrollBar_LeftClickAbsolutePosition$$$SH_ListViewExpand_SelectMouseType$$$SH_UnderlineShortcut$$$SH_SpinBox_AnimateButton$$$SH_SpinBox_KeyPressAutoRepeatRate$$$SH_SpinBox_ClickAutoRepeatRate$$$SH_Menu_FillScreenWithScroll$$$SH_ToolTipLabel_Opacity$$$SH_DrawMenuBarSeparator$$$SH_TitleBar_ModifyNotification$$$SH_Button_FocusPolicy$$$SH_MessageBox_UseBorderForButtonSpacing$$$SH_TitleBar_AutoRaise$$$SH_ToolButton_PopupDelay$$$SH_FocusFrame_Mask$$$SH_RubberBand_Mask$$$SH_WindowFrame_Mask$$$SH_SpinControls_DisableOnBounds$$$SH_Dial_BackgroundRole$$$SH_ComboBox_LayoutDirection$$$SH_ItemView_EllipsisLocation$$$SH_ItemView_ShowDecorationSelected$$$SH_ItemView_ActivateItemOnSingleClick$$$SH_ScrollBar_ContextMenu$$$SH_ScrollBar_RollBetweenButtons$$$SH_Slider_AbsoluteSetButtons$$$SH_Slider_PageSetButtons$$$SH_Menu_KeyboardSearch$$$SH_TabBar_ElideMode$$$SH_DialogButtonLayout$$$SH_ComboBox_PopupFrameStyle$$$SH_MessageBox_TextInteractionFlags$$$SH_DialogButtonBox_ButtonsHaveIcons$$$SH_SpellCheckUnderlineStyle$$$SH_MessageBox_CenterButtons$$$SH_Menu_SelectionWrap$$$SH_ItemView_MovementWithoutUpdatingSelection$$$SH_ToolTip_Mask$$$SH_FocusFrame_AboveWidget$$$SH_TextControl_FocusIndicatorTextCharFormat$$$SH_WizardStyle$$$SH_ItemView_ArrowKeysNavigateIntoChildren$$$SH_Menu_Mask$$$SH_Menu_FlashTriggeredItem$$$SH_Menu_FadeOutOnHide$$$SH_SpinBox_ClickAutoRepeatThreshold$$$SH_ItemView_PaintAlternatingRowColorsForEmptyArea$$$SH_FormLayoutWrapPolicy$$$SH_TabWidget_DefaultTabPosition$$$SH_ToolBar_Movable$$$SH_FormLayoutFieldGrowthPolicy$$$SH_FormLayoutFormAlignment$$$SH_FormLayoutLabelAlignment$$$SH_ItemView_DrawDelegateFrame$$$SH_TabBar_CloseButtonPosition$$$SH_DockWidget_ButtonsHaveFrame$$$SH_ToolButtonStyle$$$SH_RequestSoftwareInputPanel$$$SH_ScrollBar_Transient$$$SH_Menu_SupportsSections$$$SH_ToolTip_WakeUpDelay$$$SH_ToolTip_FallAsleepDelay$$$SH_Widget_Animate$$$SH_Splitter_OpaqueResize$$$SH_ComboBox_UseNativePopup$$$SH_LineEdit_PasswordMaskDelay$$$SH_TabBar_ChangeCurrentDelay$$$SH_Menu_SubMenuUniDirection$$$SH_Menu_SubMenuUniDirectionFailCount$$$SH_Menu_SubMenuSloppySelectOtherActions$$$SH_Menu_SubMenuSloppyCloseTimeout$$$SH_Menu_SubMenuResetWhenReenteringParent$$$SH_Menu_SubMenuDontStartSloppyOnLeave$$$SH_ItemView_ScrollMode$$$SH_CustomBase -->
<h3 class="fn" id="StyleHint-enum"><a name="StyleHint-enum"></a>enum QStyle::<span class="name">StyleHint</span></h3>
<p>This enum describes the available style hints. A style hint is a general look and/or feel hint.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::SH_EtchDisabledText</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Disabled text is &quot;etched&quot; as it is on Windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DitherDisabledText</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Disabled text is dithered as it is on Motif.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_ContextMenu</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether or not a scroll bar has a context menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_MiddleClickAbsolutePosition</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">A boolean value. If true, middle clicking on a scroll bar causes the slider to jump to that position. If false, middle clicking is ignored.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_LeftClickAbsolutePosition</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean value. If true, left clicking on a scroll bar causes the slider to jump to that position. If false, left clicking will behave as appropriate for each control.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">A boolean value. If true, when clicking a scroll bar <a href="qstyle.html#SubControl-enum">SubControl</a>, holding the mouse button down and moving the pointer outside the <a href="qstyle.html#SubControl-enum">SubControl</a>, the scroll bar continues to scroll. If false, the scollbar stops scrolling when the pointer leaves the <a href="qstyle.html#SubControl-enum">SubControl</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_RollBetweenButtons</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean value. If true, when clicking a scroll bar button (<a href="qstyle.html#SubControl-enum">SC_ScrollBarAddLine</a> or <a href="qstyle.html#SubControl-enum">SC_ScrollBarSubLine</a>) and dragging over to the opposite button (rolling) will press the new button and release the old one. When it is false, the original button is released and nothing happens (like a push button).</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_Alignment</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The alignment for tabs in a <a href="qtabwidget.html">QTabWidget</a>. Possible values are <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignLeft</a>, <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignCenter</a> and <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignRight</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Header_ArrowAlignment</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The placement of the sorting indicator may appear in list or table headers. Possible values are <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a> values (that is, an OR combination of <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignmentFlag</a> flags).</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Slider_SnapToValue</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Sliders snap to values while moving, as they do on Windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Slider_SloppyKeyEvents</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Key presses handled in a sloppy manner, i.e&#x2e;, left on a vertical slider subtracts a line.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ProgressDialog_CenterCancelButton</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Center button on progress dialogs, otherwise right aligned.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ProgressDialog_TextLabelAlignment</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">The alignment for text labels in progress dialogs; <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignCenter</a> on Windows, <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignVCenter</a> otherwise.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_PrintDialog_RightAlignButtons</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">Right align buttons in the print dialog, as done on Windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MainWindow_SpaceBelowMenuBar</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">One or two pixel space between the menu bar and the dockarea, as done on Windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FontDialog_SelectAssociatedText</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">Select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, as done on Windows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_KeyboardSearch</code></td><td class="topAlign tblval">?</td><td class="topAlign">Typing causes a menu to be search for relevant items, otherwise only mnemnonic is considered.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_AllowActiveAndDisabled</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">Allows disabled menu items to be active.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SpaceActivatesItem</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">Pressing the space bar activates the item, as done on Motif.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuPopupDelay</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">The number of milliseconds to wait before opening a submenu (256 on Windows, 96 on Motif).</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_Scrollable</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether popup menus must support scrolling.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SloppySubMenus</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether popup menus must support the user moving the mouse cursor to a submenu while crossing other items of the menu. This is supported on most modern desktop platforms.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuUniDirection</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; If the cursor has to move towards the submenu (like it is on macOS), or if the cursor can move in any direction as long as it reaches the submenu before the sloppy timeout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuUniDirectionFailCount</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; When SH_Menu_SubMenuUniDirection is defined this enum defines the number of failed mouse moves before the sloppy submenu is discarded. This can be used to control the &quot;strictness&quot; of the uni direction algorithm.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuSloppySelectOtherActions</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; Should other action items be selected when the mouse moves towards a sloppy submenu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuSloppyCloseTimeout</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; The timeout used to close sloppy submenus.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuResetWhenReenteringParent</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; When entering parent from child submenu, should the sloppy state be reset, effectively closing the child and making the current submenu active.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SubMenuDontStartSloppyOnLeave</code></td><td class="topAlign tblval">?</td><td class="topAlign">Since Qt 5.5&#x2e; Do not start sloppy timers when the mouse leaves a sub-menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollView_FrameOnlyAroundContents</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">Whether scrollviews draw their frame only around contents (like Motif), or around contents, scroll bars and corner widgets (like Windows).</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MenuBar_AltKeyNavigation</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">Menu bars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ComboBox_ListMouseTracking</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">Mouse tracking in combobox drop-down lists.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_MouseTracking</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">Mouse tracking in popup menus.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MenuBar_MouseTracking</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">Mouse tracking in menu bars.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_FillScreenWithScroll</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether scrolling popups should fill the screen as they are scrolled.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SelectionWrap</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether popups should allow the selections to wrap, that is when selection should the next item be the first item.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_ChangeHighlightOnFocus</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">Gray out selected items when losing focus.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Widget_ShareActivation</code></td><td class="topAlign tblval"><code>23</code></td><td class="topAlign">Turn on sharing activation with floating modeless dialogs.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_SelectMouseType</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Which type of mouse event should cause a tab to be selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ListViewExpand_SelectMouseType</code></td><td class="topAlign tblval">?</td><td class="topAlign">Which type of mouse event should cause a list view expansion to be selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_PreferNoArrows</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether a tab bar should suggest a size to prevent scoll arrows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ComboBox_Popup</code></td><td class="topAlign tblval"><code>25</code></td><td class="topAlign">Allows popups as a combobox drop-down menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Workspace_FillSpaceOnMaximize</code></td><td class="topAlign tblval"><code>24</code></td><td class="topAlign">The workspace should maximize the client area.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TitleBar_NoBorder</code></td><td class="topAlign tblval"><code>26</code></td><td class="topAlign">The title bar has no border.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_StopMouseOverSlider</code></td><td class="topAlign tblval"><code>SH_Slider_StopMouseOverSlider</code></td><td class="topAlign">Obsolete. Use SH_Slider_StopMouseOverSlider instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Slider_StopMouseOverSlider</code></td><td class="topAlign tblval"><code>27</code></td><td class="topAlign">Stops auto-repeat when the slider reaches the mouse position.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_BlinkCursorWhenTextSelected</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether cursor should blink when text is selected.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_RichText_FullWidthSelection</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether richtext selections should extend to the full width of the document.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_GroupBox_TextLabelVerticalAlignment</code></td><td class="topAlign tblval">?</td><td class="topAlign">How to vertically align a group box's text label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_GroupBox_TextLabelColor</code></td><td class="topAlign tblval">?</td><td class="topAlign">How to paint a group box's text label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DialogButtons_DefaultButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Which button gets the default status in a dialog's button widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolBox_SelectedPageTitleBold</code></td><td class="topAlign tblval">?</td><td class="topAlign">Boldness of the selected page title in a <a href="qtoolbox.html">QToolBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_LineEdit_PasswordCharacter</code></td><td class="topAlign tblval">?</td><td class="topAlign">The Unicode character to be used for passwords.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_LineEdit_PasswordMaskDelay</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the delay before visible character is masked with password character, in milliseconds. This enum value was added in Qt 5.4&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Table_GridLineColor</code></td><td class="topAlign tblval">?</td><td class="topAlign">The RGB value of the grid for a table.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_UnderlineShortcut</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether shortcuts are underlined.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpellCheckUnderlineStyle</code></td><td class="topAlign tblval">?</td><td class="topAlign">A <a href="../qtgui/qtextcharformat.html#UnderlineStyle-enum">QTextCharFormat::UnderlineStyle</a> value that specifies the way misspelled words should be underlined.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpinBox_AnimateButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Animate a click when up or down is pressed in a spin box.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpinBox_KeyPressAutoRepeatRate</code></td><td class="topAlign tblval">?</td><td class="topAlign">Auto-repeat interval for spinbox key presses.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpinBox_ClickAutoRepeatRate</code></td><td class="topAlign tblval">?</td><td class="topAlign">Auto-repeat interval for spinbox mouse clicks.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpinBox_ClickAutoRepeatThreshold</code></td><td class="topAlign tblval">?</td><td class="topAlign">Auto-repeat threshold for spinbox mouse clicks.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolTipLabel_Opacity</code></td><td class="topAlign tblval">?</td><td class="topAlign">An integer indicating the opacity for the tip label, 0 is completely transparent, 255 is completely opaque.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DrawMenuBarSeparator</code></td><td class="topAlign tblval">?</td><td class="topAlign">Indicates whether or not the menu bar draws separators.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TitleBar_ModifyNotification</code></td><td class="topAlign tblval">?</td><td class="topAlign">Indicates if the title bar should show a '*' for windows that are modified.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Button_FocusPolicy</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default focus policy for buttons.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom style hints. Custom values must be greater than this value.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MessageBox_UseBorderForButtonSpacing</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean indicating what the to use the border of the buttons (computed as half the button height) for the spacing of the button in a message box.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MessageBox_CenterButtons</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean indicating whether the buttons in the message box should be centered or not (see QDialogButtonBox::setCentered()).</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_MessageBox_TextInteractionFlags</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean indicating if the text in a message box should allow user interfactions (e.g&#x2e; selection) or not.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TitleBar_AutoRaise</code></td><td class="topAlign tblval">?</td><td class="topAlign">A boolean indicating whether controls on a title bar ought to update when the mouse is over them.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolButton_PopupDelay</code></td><td class="topAlign tblval">?</td><td class="topAlign">An int indicating the popup delay in milliseconds for menus attached to tool buttons.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FocusFrame_Mask</code></td><td class="topAlign tblval">?</td><td class="topAlign">The mask of the focus frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_RubberBand_Mask</code></td><td class="topAlign tblval">?</td><td class="topAlign">The mask of the rubber band.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_WindowFrame_Mask</code></td><td class="topAlign tblval">?</td><td class="topAlign">The mask of the window frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_SpinControls_DisableOnBounds</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if the spin controls will shown as disabled when reaching the spin range boundary.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Dial_BackgroundRole</code></td><td class="topAlign tblval">?</td><td class="topAlign">Defines the style's preferred background role (as <a href="../qtgui/qpalette.html#ColorRole-enum">QPalette::ColorRole</a>) for a dial widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ComboBox_LayoutDirection</code></td><td class="topAlign tblval">?</td><td class="topAlign">The layout direction for the combo box. By default it should be the same as indicated by the <a href="qstyleoption.html#direction-var">QStyleOption::direction</a> variable.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_EllipsisLocation</code></td><td class="topAlign tblval">?</td><td class="topAlign">The location where ellipses should be added for item text that is too long to fit in an view item.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_ShowDecorationSelected</code></td><td class="topAlign tblval">?</td><td class="topAlign">When an item in an item view is selected, also highlight the branch or other decoration.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_ActivateItemOnSingleClick</code></td><td class="topAlign tblval">?</td><td class="topAlign">Emit the activated signal when the user single clicks on an item in an item in an item view. Otherwise the signal is emitted when the user double clicks on an item.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Slider_AbsoluteSetButtons</code></td><td class="topAlign tblval">?</td><td class="topAlign">Which mouse buttons cause a slider to set the value to the position clicked on.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Slider_PageSetButtons</code></td><td class="topAlign tblval">?</td><td class="topAlign">Which mouse buttons cause a slider to page step the value.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_ElideMode</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default eliding style for a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DialogButtonLayout</code></td><td class="topAlign tblval">?</td><td class="topAlign">Controls how buttons are laid out in a <a href="qdialogbuttonbox.html">QDialogButtonBox</a>, returns a <a href="qdialogbuttonbox.html#ButtonLayout-enum">QDialogButtonBox::ButtonLayout</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_WizardStyle</code></td><td class="topAlign tblval">?</td><td class="topAlign">Controls the look and feel of a <a href="qwizard.html">QWizard</a>. Returns a <a href="qwizard.html#WizardStyle-enum">QWizard::WizardStyle</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FormLayoutWrapPolicy</code></td><td class="topAlign tblval">?</td><td class="topAlign">Provides a default for how rows are wrapped in a <a href="qformlayout.html">QFormLayout</a>. Returns a <a href="qformlayout.html#RowWrapPolicy-enum">QFormLayout::RowWrapPolicy</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FormLayoutFieldGrowthPolicy</code></td><td class="topAlign tblval">?</td><td class="topAlign">Provides a default for how fields can grow in a <a href="qformlayout.html">QFormLayout</a>. Returns a <a href="qformlayout.html#FieldGrowthPolicy-enum">QFormLayout::FieldGrowthPolicy</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FormLayoutFormAlignment</code></td><td class="topAlign tblval">?</td><td class="topAlign">Provides a default for how a <a href="qformlayout.html">QFormLayout</a> aligns its contents within the available space. Returns a <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FormLayoutLabelAlignment</code></td><td class="topAlign tblval">?</td><td class="topAlign">Provides a default for how a <a href="qformlayout.html">QFormLayout</a> aligns labels within the available space. Returns a <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a> enum.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren</code></td><td class="topAlign tblval">?</td><td class="topAlign">Controls whether the tree view will select the first child when it is exapanded and the right arrow key is pressed.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ComboBox_PopupFrameStyle</code></td><td class="topAlign tblval">?</td><td class="topAlign">The frame style used when drawing a combobox popup menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DialogButtonBox_ButtonsHaveIcons</code></td><td class="topAlign tblval">?</td><td class="topAlign">Indicates whether or not StandardButtons in <a href="qdialogbuttonbox.html">QDialogButtonBox</a> should have icons or not.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_MovementWithoutUpdatingSelection</code></td><td class="topAlign tblval">?</td><td class="topAlign">The item view is able to indicate a current item without changing the selection.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolTip_Mask</code></td><td class="topAlign tblval">?</td><td class="topAlign">The mask of a tool tip.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_FocusFrame_AboveWidget</code></td><td class="topAlign tblval">?</td><td class="topAlign">The FocusFrame is stacked above the widget that it is &quot;focusing on&quot;.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TextControl_FocusIndicatorTextCharFormat</code></td><td class="topAlign tblval">?</td><td class="topAlign">Specifies the text format used to highlight focused anchors in rich text documents displayed for example in <a href="qtextbrowser.html">QTextBrowser</a>. The format has to be a <a href="../qtgui/qtextcharformat.html">QTextCharFormat</a> returned in the variant of the <a href="qstylehintreturnvariant.html">QStyleHintReturnVariant</a> return value. The <a href="../qtgui/qtextformat.html#Property-enum">QTextFormat::OutlinePen</a> property is used for the outline and <a href="../qtgui/qtextformat.html#Property-enum">QTextFormat::BackgroundBrush</a> for the background of the highlighted area.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_FlashTriggeredItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Flash triggered item.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_FadeOutOnHide</code></td><td class="topAlign tblval">?</td><td class="topAlign">Fade out the menu instead of hiding it immediately.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabWidget_DefaultTabPosition</code></td><td class="topAlign tblval">?</td><td class="topAlign">Default position of the tab bar in a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolBar_Movable</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if the tool bar is movable by default.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_PaintAlternatingRowColorsForEmptyArea</code></td><td class="topAlign tblval">?</td><td class="topAlign">Whether <a href="qtreeview.html">QTreeView</a> paints alternating row colors for the area that does not have any items.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_Mask</code></td><td class="topAlign tblval">?</td><td class="topAlign">The mask for a popup menu.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_DrawDelegateFrame</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if there should be a frame for a delegate widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_CloseButtonPosition</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the position of the close button on a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_DockWidget_ButtonsHaveFrame</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if dockwidget buttons should have frames. Default is true.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolButtonStyle</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the default system style for tool buttons that uses <a href="../qtcore/qt.html#ToolButtonStyle-enum">Qt::ToolButtonFollowStyle</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_RequestSoftwareInputPanel</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines when a software input panel should be requested by input widgets. Returns an enum of type <a href="qstyle.html#RequestSoftwareInputPanel-enum">QStyle::RequestSoftwareInputPanel</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ScrollBar_Transient</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if the style supports transient scroll bars. Transient scroll bars appear when the content is scrolled and disappear when they are no longer needed.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Menu_SupportsSections</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if the style displays sections in menus or treat them as plain separators. Sections are separators with a text and icon hint.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolTip_WakeUpDelay</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the delay before a tooltip is shown, in milliseconds.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ToolTip_FallAsleepDelay</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the delay (in milliseconds) before a new wake time is needed when a tooltip is shown (notice: shown, not hidden). When a new wake isn't needed, a user-requested tooltip will be shown nearly instantly.</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Widget_Animate</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if the widget should show animations or not, for example a transition between checked and unchecked statuses in a checkbox. This enum value has been introduced in Qt 5.2&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_Splitter_OpaqueResize</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines if resizing is opaque This enum value has been introduced in Qt 5.2</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_TabBar_ChangeCurrentDelay</code></td><td class="topAlign tblval">?</td><td class="topAlign">Determines the delay before the current tab is changed while dragging over the tabbar, in milliseconds. This enum value has been introduced in Qt 5.4</td></tr>
<tr><td class="topAlign"><code>QStyle::SH_ItemView_ScrollMode</code></td><td class="topAlign tblval">?</td><td class="topAlign">The default vertical and horizontal scroll mode as specified by the style. Can be overridden with <a href="qabstractitemview.html#verticalScrollMode-prop">QAbstractItemView::setVerticalScrollMode</a>() and <a href="qabstractitemview.html#horizontalScrollMode-prop">QAbstractItemView::setHorizontalScrollMode</a>(). This enum value has been introduced in Qt 5.7&#x2e;</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#styleHint">styleHint</a>().</p>
<!-- @@@StyleHint -->
<!-- $$$SubControl$$$SC_None$$$SC_ScrollBarAddLine$$$SC_ScrollBarSubLine$$$SC_ScrollBarAddPage$$$SC_ScrollBarSubPage$$$SC_ScrollBarFirst$$$SC_ScrollBarLast$$$SC_ScrollBarSlider$$$SC_ScrollBarGroove$$$SC_SpinBoxUp$$$SC_SpinBoxDown$$$SC_SpinBoxFrame$$$SC_SpinBoxEditField$$$SC_ComboBoxFrame$$$SC_ComboBoxEditField$$$SC_ComboBoxArrow$$$SC_ComboBoxListBoxPopup$$$SC_SliderGroove$$$SC_SliderHandle$$$SC_SliderTickmarks$$$SC_ToolButton$$$SC_ToolButtonMenu$$$SC_TitleBarSysMenu$$$SC_TitleBarMinButton$$$SC_TitleBarMaxButton$$$SC_TitleBarCloseButton$$$SC_TitleBarNormalButton$$$SC_TitleBarShadeButton$$$SC_TitleBarUnshadeButton$$$SC_TitleBarContextHelpButton$$$SC_TitleBarLabel$$$SC_DialGroove$$$SC_DialHandle$$$SC_DialTickmarks$$$SC_GroupBoxCheckBox$$$SC_GroupBoxLabel$$$SC_GroupBoxContents$$$SC_GroupBoxFrame$$$SC_MdiMinButton$$$SC_MdiNormalButton$$$SC_MdiCloseButton$$$SC_CustomBase$$$SC_All -->
<h3 class="flags" id="SubControl-enum"><a name="SubControl-enum"></a>enum QStyle::<span class="name">SubControl</span><br/>flags QStyle::<span class="name">SubControls</span></h3>
<p>This enum describes the available sub controls. A subcontrol is a control element within a complex control (<a href="qstyle.html#ComplexControl-enum">ComplexControl</a>).</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::SC_None</code></td><td class="topAlign tblval"><code>0x00000000</code></td><td class="topAlign">Special value that matches no other sub control.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarAddLine</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Scroll bar add line (i.e&#x2e;, down/right arrow); see also <a href="qscrollbar.html">QScrollBar</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarSubLine</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Scroll bar sub line (i.e&#x2e;, up/left arrow).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarAddPage</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Scroll bar add page (i.e&#x2e;, page down).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarSubPage</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">Scroll bar sub page (i.e&#x2e;, page up).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarFirst</code></td><td class="topAlign tblval"><code>0x00000010</code></td><td class="topAlign">Scroll bar first line (i.e&#x2e;, home).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarLast</code></td><td class="topAlign tblval"><code>0x00000020</code></td><td class="topAlign">Scroll bar last line (i.e&#x2e;, end).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarSlider</code></td><td class="topAlign tblval"><code>0x00000040</code></td><td class="topAlign">Scroll bar slider handle.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ScrollBarGroove</code></td><td class="topAlign tblval"><code>0x00000080</code></td><td class="topAlign">Special sub-control which contains the area in which the slider handle may move.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SpinBoxUp</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Spin widget up/increase; see also <a href="qspinbox.html">QSpinBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SpinBoxDown</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Spin widget down/decrease.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SpinBoxFrame</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Spin widget frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SpinBoxEditField</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">Spin widget edit field.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ComboBoxEditField</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Combobox edit field; see also <a href="qcombobox.html">QComboBox</a>.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ComboBoxArrow</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Combobox arrow button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ComboBoxFrame</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Combobox frame.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ComboBoxListBoxPopup</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">The reference rectangle for the combobox popup. Used to calculate the position of the popup.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SliderGroove</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Special sub-control which contains the area in which the slider handle may move.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SliderHandle</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Slider handle.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_SliderTickmarks</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Slider tickmarks.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ToolButton</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">Tool button (see also <a href="qtoolbutton.html">QToolButton</a>).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_ToolButtonMenu</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Sub-control for opening a popup menu in a tool button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarSysMenu</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">System menu button (i.e&#x2e;, restore, close, etc.)&#x2e;</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarMinButton</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">Minimize button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarMaxButton</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">Maximize button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarCloseButton</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">Close button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarLabel</code></td><td class="topAlign tblval"><code>0x00000100</code></td><td class="topAlign">Window title label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarNormalButton</code></td><td class="topAlign tblval"><code>0x00000010</code></td><td class="topAlign">Normal (restore) button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarShadeButton</code></td><td class="topAlign tblval"><code>0x00000020</code></td><td class="topAlign">Shade button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarUnshadeButton</code></td><td class="topAlign tblval"><code>0x00000040</code></td><td class="topAlign">Unshade button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_TitleBarContextHelpButton</code></td><td class="topAlign tblval"><code>0x00000080</code></td><td class="topAlign">Context Help button.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_DialHandle</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">The handle of the dial (i.e&#x2e; what you use to control the dial).</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_DialGroove</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">The groove for the dial.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_DialTickmarks</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">The tickmarks for the dial.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_GroupBoxFrame</code></td><td class="topAlign tblval"><code>0x00000008</code></td><td class="topAlign">The frame of a group box.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_GroupBoxLabel</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">The title of a group box.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_GroupBoxCheckBox</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">The optional check box of a group box.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_GroupBoxContents</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">The group box contents.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_MdiNormalButton</code></td><td class="topAlign tblval"><code>0x00000002</code></td><td class="topAlign">The normal button for a MDI subwindow in the menu bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_MdiMinButton</code></td><td class="topAlign tblval"><code>0x00000001</code></td><td class="topAlign">The minimize button for a MDI subwindow in the menu bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_MdiCloseButton</code></td><td class="topAlign tblval"><code>0x00000004</code></td><td class="topAlign">The close button for a MDI subwindow in the menu bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SC_All</code></td><td class="topAlign tblval"><code>0xffffffff</code></td><td class="topAlign">Special value that matches all sub-controls.</td></tr>
</table></div>
<p>The SubControls type is a typedef for <a href="../qtcore/qflags.html">QFlags</a>&lt;SubControl&gt;. It stores an OR combination of SubControl values.</p>
<p><b>See also </b><a href="qstyle.html#ComplexControl-enum">ComplexControl</a>.</p>
<!-- @@@SubControl -->
<!-- $$$SubElement$$$SE_PushButtonContents$$$SE_PushButtonFocusRect$$$SE_CheckBoxIndicator$$$SE_CheckBoxContents$$$SE_CheckBoxFocusRect$$$SE_CheckBoxClickRect$$$SE_RadioButtonIndicator$$$SE_RadioButtonContents$$$SE_RadioButtonFocusRect$$$SE_RadioButtonClickRect$$$SE_ComboBoxFocusRect$$$SE_SliderFocusRect$$$SE_ProgressBarGroove$$$SE_ProgressBarContents$$$SE_ProgressBarLabel$$$SE_ToolBoxTabContents$$$SE_HeaderLabel$$$SE_HeaderArrow$$$SE_TabWidgetTabBar$$$SE_TabWidgetTabPane$$$SE_TabWidgetTabContents$$$SE_TabWidgetLeftCorner$$$SE_TabWidgetRightCorner$$$SE_ViewItemCheckIndicator$$$SE_ItemViewItemCheckIndicator$$$SE_TabBarTearIndicator$$$SE_TabBarTearIndicatorLeft$$$SE_TreeViewDisclosureItem$$$SE_LineEditContents$$$SE_FrameContents$$$SE_DockWidgetCloseButton$$$SE_DockWidgetFloatButton$$$SE_DockWidgetTitleBarText$$$SE_DockWidgetIcon$$$SE_CheckBoxLayoutItem$$$SE_ComboBoxLayoutItem$$$SE_DateTimeEditLayoutItem$$$SE_DialogButtonBoxLayoutItem$$$SE_LabelLayoutItem$$$SE_ProgressBarLayoutItem$$$SE_PushButtonLayoutItem$$$SE_RadioButtonLayoutItem$$$SE_SliderLayoutItem$$$SE_SpinBoxLayoutItem$$$SE_ToolButtonLayoutItem$$$SE_FrameLayoutItem$$$SE_GroupBoxLayoutItem$$$SE_TabWidgetLayoutItem$$$SE_ItemViewItemDecoration$$$SE_ItemViewItemText$$$SE_ItemViewItemFocusRect$$$SE_TabBarTabLeftButton$$$SE_TabBarTabRightButton$$$SE_TabBarTabText$$$SE_ShapedFrameContents$$$SE_ToolBarHandle$$$SE_TabBarScrollLeftButton$$$SE_TabBarScrollRightButton$$$SE_TabBarTearIndicatorRight$$$SE_CustomBase -->
<h3 class="fn" id="SubElement-enum"><a name="SubElement-enum"></a>enum QStyle::<span class="name">SubElement</span></h3>
<p>This enum represents a sub-area of a widget. Style implementations use these areas to draw the different parts of a widget.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QStyle::SE_PushButtonContents</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">Area containing the label (icon with text or pixmap).</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_PushButtonFocusRect</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">Area for the focus rect (usually larger than the contents rect).</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_PushButtonLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CheckBoxIndicator</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Area for the state indicator (e.g&#x2e;, check mark).</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CheckBoxContents</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">Area for the label (text or pixmap).</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CheckBoxFocusRect</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">Area for the focus indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CheckBoxClickRect</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">Clickable area, defaults to SE_CheckBoxFocusRect.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CheckBoxLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DateTimeEditLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_RadioButtonIndicator</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">Area for the state indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_RadioButtonContents</code></td><td class="topAlign tblval"><code>7</code></td><td class="topAlign">Area for the label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_RadioButtonFocusRect</code></td><td class="topAlign tblval"><code>8</code></td><td class="topAlign">Area for the focus indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_RadioButtonClickRect</code></td><td class="topAlign tblval"><code>9</code></td><td class="topAlign">Clickable area, defaults to SE_RadioButtonFocusRect.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_RadioButtonLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ComboBoxFocusRect</code></td><td class="topAlign tblval"><code>10</code></td><td class="topAlign">Area for the focus indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_SliderFocusRect</code></td><td class="topAlign tblval"><code>11</code></td><td class="topAlign">Area for the focus indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_SliderLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_SpinBoxLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ProgressBarGroove</code></td><td class="topAlign tblval"><code>12</code></td><td class="topAlign">Area for the groove.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ProgressBarContents</code></td><td class="topAlign tblval"><code>13</code></td><td class="topAlign">Area for the progress indicator.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ProgressBarLabel</code></td><td class="topAlign tblval"><code>14</code></td><td class="topAlign">Area for the text label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ProgressBarLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_FrameContents</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a frame's contents.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ShapedFrameContents</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a frame's contents using the shape in <a href="qstyleoptionframe.html">QStyleOptionFrame</a>; see <a href="qframe.html">QFrame</a></td></tr>
<tr><td class="topAlign"><code>QStyle::SE_FrameLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_HeaderArrow</code></td><td class="topAlign tblval"><code>17</code></td><td class="topAlign">Area for the sort indicator for a header.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_HeaderLabel</code></td><td class="topAlign tblval"><code>16</code></td><td class="topAlign">Area for the label in a header.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_LabelLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_LineEditContents</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a line edit's contents.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetLeftCorner</code></td><td class="topAlign tblval"><code>21</code></td><td class="topAlign">Area for the left corner widget in a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetRightCorner</code></td><td class="topAlign tblval"><code>22</code></td><td class="topAlign">Area for the right corner widget in a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetTabBar</code></td><td class="topAlign tblval"><code>18</code></td><td class="topAlign">Area for the tab bar widget in a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetTabContents</code></td><td class="topAlign tblval"><code>20</code></td><td class="topAlign">Area for the contents of the tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetTabPane</code></td><td class="topAlign tblval"><code>19</code></td><td class="topAlign">Area for the pane of a tab widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabWidgetLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ToolBoxTabContents</code></td><td class="topAlign tblval"><code>15</code></td><td class="topAlign">Area for a toolbox tab's icon and label.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ToolButtonLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ItemViewItemCheckIndicator</code></td><td class="topAlign tblval"><code>SE_ViewItemCheckIndicator</code></td><td class="topAlign">Area for a view item's check mark.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTearIndicator</code></td><td class="topAlign tblval">?</td><td class="topAlign">Deprecated. Use SE_TabBarTearIndicatorLeft instead.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTearIndicatorLeft</code></td><td class="topAlign tblval"><code>SE_TabBarTearIndicator</code></td><td class="topAlign">Area for the tear indicator on the left side of a tab bar with scroll arrows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTearIndicatorRight</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the tear indicator on the right side of a tab bar with scroll arrows.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarScrollLeftButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the scroll left button on a tab bar with scroll buttons.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarScrollRightButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the scroll right button on a tab bar with scroll buttons.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TreeViewDisclosureItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the actual disclosure item in a tree branch.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DialogButtonBoxLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_GroupBoxLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_CustomBase</code></td><td class="topAlign tblval"><code>0xf0000000</code></td><td class="topAlign">Base value for custom sub-elements. Custom values must be greater than this value.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DockWidgetFloatButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">The float button of a dock widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DockWidgetTitleBarText</code></td><td class="topAlign tblval">?</td><td class="topAlign">The text bounds of the dock widgets title.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DockWidgetCloseButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">The close button of a dock widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_DockWidgetIcon</code></td><td class="topAlign tblval">?</td><td class="topAlign">The icon of a dock widget.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ComboBoxLayoutItem</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area that counts for the parent layout.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ItemViewItemDecoration</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a view item's decoration (icon).</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ItemViewItemText</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a view item's text.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ItemViewItemFocusRect</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a view item's focus rect.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTabLeftButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a widget on the left side of a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTabRightButton</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for a widget on the right side of a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_TabBarTabText</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the text on a tab in a tab bar.</td></tr>
<tr><td class="topAlign"><code>QStyle::SE_ToolBarHandle</code></td><td class="topAlign tblval">?</td><td class="topAlign">Area for the handle of a tool bar.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#subElementRect">subElementRect</a>().</p>
<!-- @@@SubElement -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QStyle[overload1]$$$QStyle -->
<h3 class="fn" id="QStyle"><a name="QStyle"></a>QStyle::<span class="name">QStyle</span>()</h3>
<p>Constructs a style object.</p>
<!-- @@@QStyle -->
<!-- $$$~QStyle[overload1]$$$~QStyle -->
<h3 class="fn" id="dtor.QStyle"><a name="dtor.QStyle"></a><code>[virtual] </code>QStyle::<span class="name">~QStyle</span>()</h3>
<p>Destroys the style object.</p>
<!-- @@@~QStyle -->
<!-- $$$alignedRect[overload1]$$$alignedRectQt::LayoutDirectionQt::AlignmentconstQSize&constQRect& -->
<h3 class="fn" id="alignedRect"><a name="alignedRect"></a><code>[static] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">alignedRect</span>(<span class="type"><a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> <i>direction</i>, <span class="type"><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> <i>alignment</i>, const <span class="type"><a href="../qtcore/qsize.html">QSize</a></span> &amp;<i>size</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rectangle</i>)</h3>
<p>Returns a new rectangle of the specified <i>size</i> that is aligned to the given <i>rectangle</i> according to the specified <i>alignment</i> and <i>direction</i>.</p>
<!-- @@@alignedRect -->
<!-- $$$combinedLayoutSpacing[overload1]$$$combinedLayoutSpacingQSizePolicy::ControlTypesQSizePolicy::ControlTypesQt::OrientationQStyleOption*QWidget* -->
<h3 class="fn" id="combinedLayoutSpacing"><a name="combinedLayoutSpacing"></a><span class="type">int</span> QStyle::<span class="name">combinedLayoutSpacing</span>(<span class="type"><a href="qsizepolicy.html#ControlType-enum">QSizePolicy::ControlTypes</a></span> <i>controls1</i>, <span class="type"><a href="qsizepolicy.html#ControlType-enum">QSizePolicy::ControlTypes</a></span> <i>controls2</i>, <span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i> = Q_NULLPTR, <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the spacing that should be used between <i>controls1</i> and <i>controls2</i> in a layout. <i>orientation</i> specifies whether the controls are laid out side by side or stacked vertically. The <i>option</i> parameter can be used to pass extra information about the parent widget. The <i>widget</i> parameter is optional and can also be used if <i>option</i> is 0.</p>
<p><i>controls1</i> and <i>controls2</i> are OR-combination of zero or more <a href="qsizepolicy.html#ControlType-enum">control types</a>.</p>
<p>This function is called by the layout system. It is used only if <a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a> or <a href="qstyle.html#PixelMetric-enum">PM_LayoutVerticalSpacing</a> returns a negative value.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qstyle.html#layoutSpacing">layoutSpacing</a>().</p>
<!-- @@@combinedLayoutSpacing -->
<!-- $$$drawComplexControl[overload1]$$$drawComplexControlComplexControlconstQStyleOptionComplex*QPainter*constQWidget* -->
<h3 class="fn" id="drawComplexControl"><a name="drawComplexControl"></a><code>[pure virtual] </code><span class="type">void</span> QStyle::<span class="name">drawComplexControl</span>(<span class="type"><a href="qstyle.html#ComplexControl-enum">ComplexControl</a></span> <i>control</i>, const <span class="type"><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a></span> *<i>option</i>, <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Draws the given <i>control</i> using the provided <i>painter</i> with the style options specified by <i>option</i>.</p>
<p>The <i>widget</i> argument is optional and can be used as aid in drawing the control.</p>
<p>The <i>option</i> parameter is a pointer to a <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> object that can be cast to the correct subclass using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. Note that the <code>rect</code> member of the specified <i>option</i> must be in logical coordinates. Reimplementations of this function should use <a href="qstyle.html#visualRect">visualRect</a>() to change the logical coordinates into screen coordinates before calling the <a href="qstyle.html#drawPrimitive">drawPrimitive</a>() or <a href="qstyle.html#drawControl">drawControl</a>() function.</p>
<p>The table below is listing the complex control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including <a href="qstyleoption.html#state-var">QStyleOption::state</a> which holds the <a href="qstyle.html#StateFlag-enum">style flags</a> that are used when drawing. The table also describes which flags that are set when casting the given <i>option</i> to the appropriate subclass.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Complex Control</th><th ><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> Subclass</th><th >Style Flag</th><th >Remark</th></tr></thead>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_SpinBox</a></td><td  rowspan="2"><a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the spin box is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the spin box has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_ComboBox</a></td><td  rowspan="2"><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the combobox is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the combobox has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_ScrollBar</a></td><td  rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the scroll bar is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the scroll bar has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_Slider</a></td><td  rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the slider is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the slider has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ComplexControl-enum">CC_Dial</a></td><td  rowspan="2"><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the dial is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the dial has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="6"><a href="qstyle.html#ComplexControl-enum">CC_ToolButton</a></td><td  rowspan="6"><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the tool button is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the tool button has input focus.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td><td >Set if the tool button is down (i.e&#x2e;, a mouse button or the space bar is pressed).</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Set if the tool button is a toggle button and is toggled on.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_AutoRaise</a></td><td >Set if the tool button has auto-raise enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Raised</a></td><td >Set if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ComplexControl-enum">CC_TitleBar</a></td><td ><a href="qstyleoptiontitlebar.html">QStyleOptionTitleBar</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the title bar is enabled.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#drawPrimitive">drawPrimitive</a>() and <a href="qstyle.html#drawControl">drawControl</a>().</p>
<!-- @@@drawComplexControl -->
<!-- $$$drawControl[overload1]$$$drawControlControlElementconstQStyleOption*QPainter*constQWidget* -->
<h3 class="fn" id="drawControl"><a name="drawControl"></a><code>[pure virtual] </code><span class="type">void</span> QStyle::<span class="name">drawControl</span>(<span class="type"><a href="qstyle.html#ControlElement-enum">ControlElement</a></span> <i>element</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i>, <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Draws the given <i>element</i> with the provided <i>painter</i> with the style options specified by <i>option</i>.</p>
<p>The <i>widget</i> argument is optional and can be used as aid in drawing the control. The <i>option</i> parameter is a pointer to a <a href="qstyleoption.html">QStyleOption</a> object that can be cast to the correct subclass using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function.</p>
<p>The table below is listing the control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including <a href="qstyleoption.html#state-var">QStyleOption::state</a> which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.</p>
<p>Note that if a control element is not listed here, it is because it uses a plain <a href="qstyleoption.html">QStyleOption</a> object.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Control Element</th><th ><a href="qstyleoption.html">QStyleOption</a> Subclass</th><th >Style Flag</th><th >Remark</th></tr></thead>
<tr valign="top" class="odd"><td  rowspan="5"><a href="qstyle.html#ControlElement-enum">CE_MenuItem</a>, <a href="qstyle.html#ControlElement-enum">CE_MenuBarItem</a></td><td  rowspan="5"><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Selected</a></td><td >The menu item is currently selected item.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >The item is enabled.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td><td >Indicates that a scroll down arrow should be drawn.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td><td >Indicates that a scroll up arrow should be drawn</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the menu bar has input focus.</td></tr>
<tr valign="top" class="even"><td  rowspan="5"><a href="qstyle.html#ControlElement-enum">CE_PushButton</a>, <a href="qstyle.html#ControlElement-enum">CE_PushButtonBevel</a>, <a href="qstyle.html#ControlElement-enum">CE_PushButtonLabel</a></td><td  rowspan="5"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the button is enabled.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the button has input focus.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Raised</a></td><td >Set if the button is not down, not on and not flat.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Set if the button is a toggle button and is toggled on.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Set if the button is down (i.e&#x2e;, the mouse button or the space bar is pressed on the button).</td></tr>
<tr valign="top" class="odd"><td  rowspan="6"><a href="qstyle.html#ControlElement-enum">CE_RadioButton</a>, <a href="qstyle.html#ControlElement-enum">CE_RadioButtonLabel</a>, <a href="qstyle.html#ControlElement-enum">CE_CheckBox</a>, <a href="qstyle.html#ControlElement-enum">CE_CheckBoxLabel</a></td><td  rowspan="6"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the button is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the button has input focus.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Set if the button is checked.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Off</a></td><td >Set if the button is not checked.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td><td >Set if the button is in the NoChange state.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Set if the button is down (i.e&#x2e;, the mouse button or the space bar is pressed on the button).</td></tr>
<tr valign="top" class="odd"><td  rowspan="2"><a href="qstyle.html#ControlElement-enum">CE_ProgressBarContents</a>, <a href="qstyle.html#ControlElement-enum">CE_ProgressBarLabel</a>, <a href="qstyle.html#ControlElement-enum">CE_ProgressBarGroove</a></td><td  rowspan="2"><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the progress bar is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the progress bar has input focus.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ControlElement-enum">CE_Header</a>, <a href="qstyle.html#ControlElement-enum">CE_HeaderSection</a>, <a href="qstyle.html#ControlElement-enum">CE_HeaderLabel</a></td><td ><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td><td ></td><td ></td></tr>
<tr valign="top" class="even"><td  rowspan="3"><a href="qstyle.html#ControlElement-enum">CE_TabBarTab</a>, <a href="qstyle.html#ControlElement-enum">CE_TabBarTabShape</a>, <a href="qstyle.html#ControlElement-enum">CE_TabBarTabLabel</a></td><td  rowspan="3"><a href="qstyleoptiontab.html">QStyleOptionTab</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the tab bar is enabled.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Selected</a></td><td >The tab bar is the currently selected tab bar.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the tab bar tab has input focus.</td></tr>
<tr valign="top" class="odd"><td  rowspan="7"><a href="qstyle.html#ControlElement-enum">CE_ToolButtonLabel</a></td><td  rowspan="7"><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the tool button is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the tool button has input focus.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Set if the tool button is down (i.e&#x2e;, a mouse button or the space bar is pressed).</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Set if the tool button is a toggle button and is toggled on.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_AutoRaise</a></td><td >Set if the tool button has auto-raise enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_MouseOver</a></td><td >Set if the mouse pointer is over the tool button.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Raised</a></td><td >Set if the button is not down and is not on.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ControlElement-enum">CE_ToolBoxTab</a></td><td ><a href="qstyleoptiontoolbox.html">QStyleOptionToolBox</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Selected</a></td><td >The tab is the currently selected tab.</td></tr>
<tr valign="top" class="odd"><td  rowspan="3"><a href="qstyle.html#ControlElement-enum">CE_HeaderSection</a></td><td  rowspan="3"><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Indicates that the section is pressed.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td><td >Indicates that the sort indicator should be pointing up.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_DownArrow</a></td><td >Indicates that the sort indicator should be pointing down.</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#drawPrimitive">drawPrimitive</a>() and <a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>
<!-- @@@drawControl -->
<!-- $$$drawItemPixmap[overload1]$$$drawItemPixmapQPainter*constQRect&intconstQPixmap& -->
<h3 class="fn" id="drawItemPixmap"><a name="drawItemPixmap"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">drawItemPixmap</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rectangle</i>, <span class="type">int</span> <i>alignment</i>, const <span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> &amp;<i>pixmap</i>) const</h3>
<p>Draws the given <i>pixmap</i> in the specified <i>rectangle</i>, according to the specified <i>alignment</i>, using the provided <i>painter</i>.</p>
<p><b>See also </b><a href="qstyle.html#drawItemText">drawItemText</a>().</p>
<!-- @@@drawItemPixmap -->
<!-- $$$drawItemText[overload1]$$$drawItemTextQPainter*constQRect&intconstQPalette&boolconstQString&QPalette::ColorRole -->
<h3 class="fn" id="drawItemText"><a name="drawItemText"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">drawItemText</span>(<span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rectangle</i>, <span class="type">int</span> <i>alignment</i>, const <span class="type"><a href="../qtgui/qpalette.html">QPalette</a></span> &amp;<i>palette</i>, <span class="type">bool</span> <i>enabled</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="../qtgui/qpalette.html#ColorRole-enum">QPalette::ColorRole</a></span> <i>textRole</i> = QPalette::NoRole) const</h3>
<p>Draws the given <i>text</i> in the specified <i>rectangle</i> using the provided <i>painter</i> and <i>palette</i>.</p>
<p>The text is drawn using the painter's pen, and aligned and wrapped according to the specified <i>alignment</i>. If an explicit <i>textRole</i> is specified, the text is drawn using the <i>palette</i>'s color for the given role. The <i>enabled</i> parameter indicates whether or not the item is enabled; when reimplementing this function, the <i>enabled</i> parameter should influence how the item is drawn.</p>
<p><b>See also </b><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a> and <a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>().</p>
<!-- @@@drawItemText -->
<!-- $$$drawPrimitive[overload1]$$$drawPrimitivePrimitiveElementconstQStyleOption*QPainter*constQWidget* -->
<h3 class="fn" id="drawPrimitive"><a name="drawPrimitive"></a><code>[pure virtual] </code><span class="type">void</span> QStyle::<span class="name">drawPrimitive</span>(<span class="type"><a href="qstyle.html#PrimitiveElement-enum">PrimitiveElement</a></span> <i>element</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i>, <span class="type"><a href="../qtgui/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Draws the given primitive <i>element</i> with the provided <i>painter</i> using the style options specified by <i>option</i>.</p>
<p>The <i>widget</i> argument is optional and may contain a widget that may aid in drawing the primitive element.</p>
<p>The table below is listing the primitive elements and their associated style option subclasses. The style options contain all the parameters required to draw the elements, including <a href="qstyleoption.html#state-var">QStyleOption::state</a> which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.</p>
<p>Note that if a primitive element is not listed here, it is because it uses a plain <a href="qstyleoption.html">QStyleOption</a> object.</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Primitive Element</th><th ><a href="qstyleoption.html">QStyleOption</a> Subclass</th><th >Style Flag</th><th >Remark</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_FrameFocusRect</a></td><td ><a href="qstyleoptionfocusrect.html">QStyleOptionFocusRect</a></td><td ><a href="qstyle.html#StateFlag-enum">State_FocusAtBorder</a></td><td >Whether the focus is is at the border or inside the widget.</td></tr>
<tr valign="top" class="even"><td  rowspan="2"><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorCheckBox</a></td><td  rowspan="2"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td><td >Indicates a &quot;tri-state&quot; checkbox.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Indicates the indicator is checked.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorRadioButton</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Indicates that a radio button is selected.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_NoChange</a></td><td >Indicates a &quot;tri-state&quot; controller.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Indicates the controller is enabled.</td></tr>
<tr valign="top" class="odd"><td  rowspan="4"><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorBranch</a></td><td  rowspan="4"><a href="qstyleoption.html">QStyleOption</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Children</a></td><td >Indicates that the control for expanding the tree to show child items, should be drawn.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Item</a></td><td >Indicates that a horizontal branch (to show a child item), should be drawn.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Open</a></td><td >Indicates that the tree branch is expanded.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_Sibling</a></td><td >Indicates that a vertical line (to show a sibling item), should be drawn.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorHeaderArrow</a></td><td ><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td><td ><a href="qstyle.html#StateFlag-enum">State_UpArrow</a></td><td >Indicates that the arrow should be drawn up; otherwise it should be down.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_FrameGroupBox</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_Frame</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameLineEdit</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameMenu</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameDockWidget</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_FrameWindow</a></td><td ><a href="qstyleoptionframe.html">QStyleOptionFrame</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Indicates that the Frame should be sunken.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorToolBarHandle</a></td><td ><a href="qstyleoption.html">QStyleOption</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Horizontal</a></td><td >Indicates that the window handle is horizontal instead of vertical.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinPlus</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinMinus</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinUp</a>, <a href="qstyle.html#PrimitiveElement-enum">PE_IndicatorSpinDown</a>,</td><td ><a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Indicates that the button is pressed.</td></tr>
<tr valign="top" class="odd"><td  rowspan="5"><a href="qstyle.html#PrimitiveElement-enum">PE_PanelButtonCommand</a></td><td  rowspan="5"><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td><td ><a href="qstyle.html#StateFlag-enum">State_Enabled</a></td><td >Set if the button is enabled.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_HasFocus</a></td><td >Set if the button has input focus.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Raised</a></td><td >Set if the button is not down, not on and not flat.</td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#StateFlag-enum">State_On</a></td><td >Set if the button is a toggle button and is toggled on.</td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#StateFlag-enum">State_Sunken</a></td><td >Set if the button is down (i.e&#x2e;, the mouse button or the space bar is pressed on the button).</td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#drawComplexControl">drawComplexControl</a>() and <a href="qstyle.html#drawControl">drawControl</a>().</p>
<!-- @@@drawPrimitive -->
<!-- $$$generatedIconPixmap[overload1]$$$generatedIconPixmapQIcon::ModeconstQPixmap&constQStyleOption* -->
<h3 class="fn" id="generatedIconPixmap"><a name="generatedIconPixmap"></a><code>[pure virtual] </code><span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> QStyle::<span class="name">generatedIconPixmap</span>(<span class="type"><a href="../qtgui/qicon.html#Mode-enum">QIcon::Mode</a></span> <i>iconMode</i>, const <span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> &amp;<i>pixmap</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i>) const</h3>
<p>Returns a copy of the given <i>pixmap</i>, styled to conform to the specified <i>iconMode</i> and taking into account the palette specified by <i>option</i>.</p>
<p>The <i>option</i> parameter can pass extra information, but it must contain a palette.</p>
<p>Note that not all pixmaps will conform, in which case the returned pixmap is a plain copy.</p>
<p><b>See also </b><a href="../qtgui/qicon.html">QIcon</a>.</p>
<!-- @@@generatedIconPixmap -->
<!-- $$$hitTestComplexControl[overload1]$$$hitTestComplexControlComplexControlconstQStyleOptionComplex*constQPoint&constQWidget* -->
<h3 class="fn" id="hitTestComplexControl"><a name="hitTestComplexControl"></a><code>[pure virtual] </code><span class="type"><a href="qstyle.html#SubControl-enum">SubControl</a></span> QStyle::<span class="name">hitTestComplexControl</span>(<span class="type"><a href="qstyle.html#ComplexControl-enum">ComplexControl</a></span> <i>control</i>, const <span class="type"><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a></span> *<i>option</i>, const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>position</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the sub control at the given <i>position</i> in the given complex <i>control</i> (with the style options specified by <i>option</i>).</p>
<p>Note that the <i>position</i> is expressed in screen coordinates.</p>
<p>The <i>option</i> argument is a pointer to a <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> object (or one of its subclasses). The object can be cast to the appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. See <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() for details. The <i>widget</i> argument is optional and can contain additional information for the function.</p>
<p><b>See also </b><a href="qstyle.html#drawComplexControl">drawComplexControl</a>() and <a href="qstyle.html#subControlRect">subControlRect</a>().</p>
<!-- @@@hitTestComplexControl -->
<!-- $$$itemPixmapRect[overload1]$$$itemPixmapRectconstQRect&intconstQPixmap& -->
<h3 class="fn" id="itemPixmapRect"><a name="itemPixmapRect"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">itemPixmapRect</span>(const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rectangle</i>, <span class="type">int</span> <i>alignment</i>, const <span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span> &amp;<i>pixmap</i>) const</h3>
<p>Returns the area within the given <i>rectangle</i> in which to draw the specified <i>pixmap</i> according to the defined <i>alignment</i>.</p>
<!-- @@@itemPixmapRect -->
<!-- $$$itemTextRect[overload1]$$$itemTextRectconstQFontMetrics&constQRect&intboolconstQString& -->
<h3 class="fn" id="itemTextRect"><a name="itemTextRect"></a><code>[virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">itemTextRect</span>(const <span class="type"><a href="../qtgui/qfontmetrics.html">QFontMetrics</a></span> &amp;<i>metrics</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>rectangle</i>, <span class="type">int</span> <i>alignment</i>, <span class="type">bool</span> <i>enabled</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>) const</h3>
<p>Returns the area within the given <i>rectangle</i> in which to draw the provided <i>text</i> according to the specified font <i>metrics</i> and <i>alignment</i>. The <i>enabled</i> parameter indicates whether or not the associated item is enabled.</p>
<p>If the given <i>rectangle</i> is larger than the area needed to render the <i>text</i>, the rectangle that is returned will be offset within <i>rectangle</i> according to the specified <i>alignment</i>. For example, if <i>alignment</i> is <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignCenter</a>, the returned rectangle will be centered within <i>rectangle</i>. If the given <i>rectangle</i> is smaller than the area needed, the returned rectangle will be the smallest rectangle large enough to render the <i>text</i>.</p>
<p><b>See also </b><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a>.</p>
<!-- @@@itemTextRect -->
<!-- $$$layoutSpacing[overload1]$$$layoutSpacingQSizePolicy::ControlTypeQSizePolicy::ControlTypeQt::OrientationconstQStyleOption*constQWidget* -->
<h3 class="fn" id="layoutSpacing"><a name="layoutSpacing"></a><code>[pure virtual] </code><span class="type">int</span> QStyle::<span class="name">layoutSpacing</span>(<span class="type"><a href="qsizepolicy.html#ControlType-enum">QSizePolicy::ControlType</a></span> <i>control1</i>, <span class="type"><a href="qsizepolicy.html#ControlType-enum">QSizePolicy::ControlType</a></span> <i>control2</i>, <span class="type"><a href="../qtcore/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i> = Q_NULLPTR, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the spacing that should be used between <i>control1</i> and <i>control2</i> in a layout. <i>orientation</i> specifies whether the controls are laid out side by side or stacked vertically. The <i>option</i> parameter can be used to pass extra information about the parent widget. The <i>widget</i> parameter is optional and can also be used if <i>option</i> is 0.</p>
<p>This function is called by the layout system. It is used only if <a href="qstyle.html#PixelMetric-enum">PM_LayoutHorizontalSpacing</a> or <a href="qstyle.html#PixelMetric-enum">PM_LayoutVerticalSpacing</a> returns a negative value.</p>
<p>This function was introduced in  Qt 4.3.</p>
<p><b>See also </b><a href="qstyle.html#combinedLayoutSpacing">combinedLayoutSpacing</a>().</p>
<!-- @@@layoutSpacing -->
<!-- $$$pixelMetric[overload1]$$$pixelMetricPixelMetricconstQStyleOption*constQWidget* -->
<h3 class="fn" id="pixelMetric"><a name="pixelMetric"></a><code>[pure virtual] </code><span class="type">int</span> QStyle::<span class="name">pixelMetric</span>(<span class="type"><a href="qstyle.html#PixelMetric-enum">PixelMetric</a></span> <i>metric</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i> = Q_NULLPTR, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the value of the given pixel <i>metric</i>.</p>
<p>The specified <i>option</i> and <i>widget</i> can be used for calculating the metric. In general, the <i>widget</i> argument is not used. The <i>option</i> can be cast to the appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. Note that the <i>option</i> may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate <i>option</i> casts:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Pixel Metric</th><th ><a href="qstyleoption.html">QStyleOption</a> Subclass</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PixelMetric-enum">PM_SliderControlThickness</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PixelMetric-enum">PM_SliderLength</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PixelMetric-enum">PM_SliderTickmarkOffset</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PixelMetric-enum">PM_SliderSpaceAvailable</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PixelMetric-enum">PM_ScrollBarExtent</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabOverlap</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabHSpace</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PixelMetric-enum">PM_TabBarTabVSpace</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#PixelMetric-enum">PM_TabBarBaseHeight</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#PixelMetric-enum">PM_TabBarBaseOverlap</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
</table></div>
<p>Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.</p>
<!-- @@@pixelMetric -->
<!-- $$$polish[overload1]$$$polishQWidget* -->
<h3 class="fn" id="polish"><a name="polish"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">polish</span>(<span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i>)</h3>
<p>Initializes the appearance of the given <i>widget</i>.</p>
<p>This function is called for every widget at some point after it has been fully created but just <i>before</i> it is shown for the very first time.</p>
<p>Note that the default implementation does nothing. Reasonable actions in this function might be to call the QWidget::setBackgroundMode() function for the widget. Do not use the function to set, for example, the geometry. Reimplementing this function provides a back-door through which the appearance of a widget can be changed, but with Qt's style engine it is rarely necessary to implement this function; reimplement <a href="qstyle.html#drawItemPixmap">drawItemPixmap</a>(), <a href="qstyle.html#drawItemText">drawItemText</a>(), <a href="qstyle.html#drawPrimitive">drawPrimitive</a>(), etc. instead.</p>
<p>The <a href="../qtcore/qobject.html#inherits">QWidget::inherits</a>() function may provide enough information to allow class-specific customizations. But because new <a href="qstyle.html">QStyle</a> subclasses are expected to work reasonably with all current and <i>future</i> widgets, limited use of hard-coded customization is recommended.</p>
<p><b>See also </b><a href="qstyle.html#unpolish">unpolish</a>().</p>
<!-- @@@polish -->
<!-- $$$polish$$$polishQApplication* -->
<h3 class="fn" id="polish-1"><a name="polish-1"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">polish</span>(<span class="type"><a href="qapplication.html">QApplication</a></span> *<i>application</i>)</h3>
<p>This is an overloaded function.</p>
<p>Late initialization of the given <i>application</i> object.</p>
<!-- @@@polish -->
<!-- $$$polish$$$polishQPalette& -->
<h3 class="fn" id="polish-2"><a name="polish-2"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">polish</span>(<span class="type"><a href="../qtgui/qpalette.html">QPalette</a></span> &amp;<i>palette</i>)</h3>
<p>This is an overloaded function.</p>
<p>Changes the <i>palette</i> according to style specific requirements for color palettes (if any).</p>
<p><b>See also </b><a href="../qtgui/qpalette.html">QPalette</a> and <a href="qapplication.html#setPalette">QApplication::setPalette</a>().</p>
<!-- @@@polish -->
<!-- $$$proxy[overload1]$$$proxy -->
<h3 class="fn" id="proxy"><a name="proxy"></a>const <span class="type"><a href="qstyle.html#QStyle">QStyle</a></span> *QStyle::<span class="name">proxy</span>() const</h3>
<p>This function returns the current proxy for this style. By default most styles will return themselves. However when a proxy style is in use, it will allow the style to call back into its proxy.</p>
<p>This function was introduced in  Qt 4.6.</p>
<!-- @@@proxy -->
<!-- $$$sizeFromContents[overload1]$$$sizeFromContentsContentsTypeconstQStyleOption*constQSize&constQWidget* -->
<h3 class="fn" id="sizeFromContents"><a name="sizeFromContents"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QStyle::<span class="name">sizeFromContents</span>(<span class="type"><a href="qstyle.html#ContentsType-enum">ContentsType</a></span> <i>type</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i>, const <span class="type"><a href="../qtcore/qsize.html">QSize</a></span> &amp;<i>contentsSize</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the size of the element described by the specified <i>option</i> and <i>type</i>, based on the provided <i>contentsSize</i>.</p>
<p>The <i>option</i> argument is a pointer to a <a href="qstyleoption.html">QStyleOption</a> or one of its subclasses. The <i>option</i> can be cast to the appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. The <i>widget</i> is an optional argument and can contain extra information used for calculating the size.</p>
<p>See the table below for the appropriate <i>option</i> casts:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Contents Type</th><th ><a href="qstyleoption.html">QStyleOption</a> Subclass</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_CheckBox</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_ComboBox</a></td><td ><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_GroupBox</a></td><td ><a href="qstyleoptiongroupbox.html">QStyleOptionGroupBox</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_HeaderSection</a></td><td ><a href="qstyleoptionheader.html">QStyleOptionHeader</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_ItemViewItem</a></td><td ><a href="qstyleoptionviewitem.html">QStyleOptionViewItem</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_LineEdit</a></td><td ><a href="qstyleoptionframe.html">QStyleOptionFrame</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_MdiControls</a></td><td ><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_Menu</a></td><td ><a href="qstyleoption.html">QStyleOption</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_MenuItem</a></td><td ><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_MenuBar</a></td><td ><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_MenuBarItem</a></td><td ><a href="qstyleoptionmenuitem.html">QStyleOptionMenuItem</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_ProgressBar</a></td><td ><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_PushButton</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_RadioButton</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_ScrollBar</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_SizeGrip</a></td><td ><a href="qstyleoption.html">QStyleOption</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_Slider</a></td><td ><a href="qstyleoptionslider.html">QStyleOptionSlider</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_SpinBox</a></td><td ><a href="qstyleoptionspinbox.html">QStyleOptionSpinBox</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_Splitter</a></td><td ><a href="qstyleoption.html">QStyleOption</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_TabBarTab</a></td><td ><a href="qstyleoptiontab.html">QStyleOptionTab</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#ContentsType-enum">CT_TabWidget</a></td><td ><a href="qstyleoptiontabwidgetframe.html">QStyleOptionTabWidgetFrame</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#ContentsType-enum">CT_ToolButton</a></td><td ><a href="qstyleoptiontoolbutton.html">QStyleOptionToolButton</a></td></tr>
</table></div>
<p><b>See also </b><a href="qstyle.html#ContentsType-enum">ContentsType</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>
<!-- @@@sizeFromContents -->
<!-- $$$sliderPositionFromValue[overload1]$$$sliderPositionFromValueintintintintbool -->
<h3 class="fn" id="sliderPositionFromValue"><a name="sliderPositionFromValue"></a><code>[static] </code><span class="type">int</span> QStyle::<span class="name">sliderPositionFromValue</span>(<span class="type">int</span> <i>min</i>, <span class="type">int</span> <i>max</i>, <span class="type">int</span> <i>logicalValue</i>, <span class="type">int</span> <i>span</i>, <span class="type">bool</span> <i>upsideDown</i> = false)</h3>
<p>Converts the given <i>logicalValue</i> to a pixel position. The <i>min</i> parameter maps to 0, <i>max</i> maps to <i>span</i> and other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without overflow, providing that <i>span</i> is less than 4096.</p>
<p>By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the <i>upsideDown</i> parameter to true to reverse this behavior.</p>
<p><b>See also </b><a href="qstyle.html#sliderValueFromPosition">sliderValueFromPosition</a>().</p>
<!-- @@@sliderPositionFromValue -->
<!-- $$$sliderValueFromPosition[overload1]$$$sliderValueFromPositionintintintintbool -->
<h3 class="fn" id="sliderValueFromPosition"><a name="sliderValueFromPosition"></a><code>[static] </code><span class="type">int</span> QStyle::<span class="name">sliderValueFromPosition</span>(<span class="type">int</span> <i>min</i>, <span class="type">int</span> <i>max</i>, <span class="type">int</span> <i>position</i>, <span class="type">int</span> <i>span</i>, <span class="type">bool</span> <i>upsideDown</i> = false)</h3>
<p>Converts the given pixel <i>position</i> to a logical value. 0 maps to the <i>min</i> parameter, <i>span</i> maps to <i>max</i> and other values are distributed evenly in-between.</p>
<p>This function can handle the entire integer range without overflow.</p>
<p>By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the <i>upsideDown</i> parameter to true to reverse this behavior.</p>
<p><b>See also </b><a href="qstyle.html#sliderPositionFromValue">sliderPositionFromValue</a>().</p>
<!-- @@@sliderValueFromPosition -->
<!-- $$$standardIcon[overload1]$$$standardIconStandardPixmapconstQStyleOption*constQWidget* -->
<h3 class="fn" id="standardIcon"><a name="standardIcon"></a><code>[pure virtual] </code><span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> QStyle::<span class="name">standardIcon</span>(<span class="type"><a href="qstyle.html#StandardPixmap-enum">StandardPixmap</a></span> <i>standardIcon</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i> = Q_NULLPTR, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns an icon for the given <i>standardIcon</i>.</p>
<p>The <i>standardIcon</i> is a standard pixmap which can follow some existing GUI style or guideline. The <i>option</i> argument can be used to pass extra information required when defining the appropriate icon. The <i>widget</i> argument is optional and can also be used to aid the determination of the icon.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@standardIcon -->
<!-- $$$standardPalette[overload1]$$$standardPalette -->
<h3 class="fn" id="standardPalette"><a name="standardPalette"></a><code>[virtual] </code><span class="type"><a href="../qtgui/qpalette.html">QPalette</a></span> QStyle::<span class="name">standardPalette</span>() const</h3>
<p>Returns the style's standard palette.</p>
<p>Note that on systems that support system colors, the style's standard palette is not used. In particular, the Windows XP, Vista, and Mac styles do not use the standard palette, but make use of native theme engines. With these styles, you should not set the palette with <a href="qapplication.html#setPalette">QApplication::setPalette</a>().</p>
<p><b>See also </b><a href="qapplication.html#setPalette">QApplication::setPalette</a>().</p>
<!-- @@@standardPalette -->
<!-- $$$styleHint[overload1]$$$styleHintStyleHintconstQStyleOption*constQWidget*QStyleHintReturn* -->
<h3 class="fn" id="styleHint"><a name="styleHint"></a><code>[pure virtual] </code><span class="type">int</span> QStyle::<span class="name">styleHint</span>(<span class="type"><a href="qstyle.html#StyleHint-enum">StyleHint</a></span> <i>hint</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i> = Q_NULLPTR, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR, <span class="type"><a href="qstylehintreturn.html">QStyleHintReturn</a></span> *<i>returnData</i> = Q_NULLPTR) const</h3>
<p>Returns an integer representing the specified style <i>hint</i> for the given <i>widget</i> described by the provided style <i>option</i>.</p>
<p><i>returnData</i> is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the <a href="qstylehintreturn.html">QStyleHintReturn</a> class description for details.</p>
<!-- @@@styleHint -->
<!-- $$$subControlRect[overload1]$$$subControlRectComplexControlconstQStyleOptionComplex*SubControlconstQWidget* -->
<h3 class="fn" id="subControlRect"><a name="subControlRect"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">subControlRect</span>(<span class="type"><a href="qstyle.html#ComplexControl-enum">ComplexControl</a></span> <i>control</i>, const <span class="type"><a href="qstyleoptioncomplex.html">QStyleOptionComplex</a></span> *<i>option</i>, <span class="type"><a href="qstyle.html#SubControl-enum">SubControl</a></span> <i>subControl</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the rectangle containing the specified <i>subControl</i> of the given complex <i>control</i> (with the style specified by <i>option</i>). The rectangle is defined in screen coordinates.</p>
<p>The <i>option</i> argument is a pointer to <a href="qstyleoptioncomplex.html">QStyleOptionComplex</a> or one of its subclasses, and can be cast to the appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. See <a href="qstyle.html#drawComplexControl">drawComplexControl</a>() for details. The <i>widget</i> is optional and can contain additional information for the function.</p>
<p><b>See also </b><a href="qstyle.html#drawComplexControl">drawComplexControl</a>().</p>
<!-- @@@subControlRect -->
<!-- $$$subElementRect[overload1]$$$subElementRectSubElementconstQStyleOption*constQWidget* -->
<h3 class="fn" id="subElementRect"><a name="subElementRect"></a><code>[pure virtual] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">subElementRect</span>(<span class="type"><a href="qstyle.html#SubElement-enum">SubElement</a></span> <i>element</i>, const <span class="type"><a href="qstyleoption.html">QStyleOption</a></span> *<i>option</i>, const <span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i> = Q_NULLPTR) const</h3>
<p>Returns the sub-area for the given <i>element</i> as described in the provided style <i>option</i>. The returned rectangle is defined in screen coordinates.</p>
<p>The <i>widget</i> argument is optional and can be used to aid determining the area. The <a href="qstyleoption.html">QStyleOption</a> object can be cast to the appropriate type using the <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() function. See the table below for the appropriate <i>option</i> casts:</p>
<div class="table"><table class="generic">
 <thead><tr class="qt-style"><th >Sub Element</th><th ><a href="qstyleoption.html">QStyleOption</a> Subclass</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_PushButtonContents</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_PushButtonFocusRect</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_CheckBoxIndicator</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_CheckBoxContents</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_CheckBoxFocusRect</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_RadioButtonIndicator</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_RadioButtonContents</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_RadioButtonFocusRect</a></td><td ><a href="qstyleoptionbutton.html">QStyleOptionButton</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_ComboBoxFocusRect</a></td><td ><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_ProgressBarGroove</a></td><td ><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td></tr>
<tr valign="top" class="odd"><td ><a href="qstyle.html#SubElement-enum">SE_ProgressBarContents</a></td><td ><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td></tr>
<tr valign="top" class="even"><td ><a href="qstyle.html#SubElement-enum">SE_ProgressBarLabel</a></td><td ><a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a></td></tr>
</table></div>
<!-- @@@subElementRect -->
<!-- $$$unpolish[overload1]$$$unpolishQWidget* -->
<h3 class="fn" id="unpolish"><a name="unpolish"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">unpolish</span>(<span class="type"><a href="qwidget.html">QWidget</a></span> *<i>widget</i>)</h3>
<p>Uninitialize the given <i>widget</i>'s appearance.</p>
<p>This function is the counterpart to <a href="qstyle.html#polish">polish</a>(). It is called for every polished widget whenever the style is dynamically changed; the former style has to unpolish its settings before the new style can polish them again.</p>
<p>Note that unpolish() will only be called if the widget is destroyed. This can cause problems in some cases, e.g, if you remove a widget from the UI, cache it, and then reinsert it after the style has changed; some of Qt's classes cache their widgets.</p>
<p><b>See also </b><a href="qstyle.html#polish">polish</a>().</p>
<!-- @@@unpolish -->
<!-- $$$unpolish$$$unpolishQApplication* -->
<h3 class="fn" id="unpolish-1"><a name="unpolish-1"></a><code>[virtual] </code><span class="type">void</span> QStyle::<span class="name">unpolish</span>(<span class="type"><a href="qapplication.html">QApplication</a></span> *<i>application</i>)</h3>
<p>This is an overloaded function.</p>
<p>Uninitialize the given <i>application</i>.</p>
<!-- @@@unpolish -->
<!-- $$$visualAlignment[overload1]$$$visualAlignmentQt::LayoutDirectionQt::Alignment -->
<h3 class="fn" id="visualAlignment"><a name="visualAlignment"></a><code>[static] </code><span class="type"><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> QStyle::<span class="name">visualAlignment</span>(<span class="type"><a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> <i>direction</i>, <span class="type"><a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> <i>alignment</i>)</h3>
<p>Transforms an <i>alignment</i> of <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignLeft</a> or <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignRight</a> without <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignAbsolute</a> into <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignLeft</a> or <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignRight</a> with <a href="../qtcore/qt.html#AlignmentFlag-enum">Qt::AlignAbsolute</a> according to the layout <i>direction</i>. The other alignment flags are left untouched.</p>
<p>If no horizontal alignment was specified, the function returns the default alignment for the given layout <i>direction</i>.</p>
<p><a href="qwidget.html#layoutDirection-prop">QWidget::layoutDirection</a></p>
<!-- @@@visualAlignment -->
<!-- $$$visualPos[overload1]$$$visualPosQt::LayoutDirectionconstQRect&constQPoint& -->
<h3 class="fn" id="visualPos"><a name="visualPos"></a><code>[static] </code><span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> QStyle::<span class="name">visualPos</span>(<span class="type"><a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> <i>direction</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>boundingRectangle</i>, const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>logicalPosition</i>)</h3>
<p>Returns the given <i>logicalPosition</i> converted to screen coordinates based on the specified <i>direction</i>. The <i>boundingRectangle</i> is used when performing the translation.</p>
<p><b>See also </b><a href="qwidget.html#layoutDirection-prop">QWidget::layoutDirection</a>.</p>
<!-- @@@visualPos -->
<!-- $$$visualRect[overload1]$$$visualRectQt::LayoutDirectionconstQRect&constQRect& -->
<h3 class="fn" id="visualRect"><a name="visualRect"></a><code>[static] </code><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QStyle::<span class="name">visualRect</span>(<span class="type"><a href="../qtcore/qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></span> <i>direction</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>boundingRectangle</i>, const <span class="type"><a href="../qtcore/qrect.html">QRect</a></span> &amp;<i>logicalRectangle</i>)</h3>
<p>Returns the given <i>logicalRectangle</i> converted to screen coordinates based on the specified <i>direction</i>. The <i>boundingRectangle</i> is used when performing the translation.</p>
<p>This function is provided to support right-to-left desktops, and is typically used in implementations of the <a href="qstyle.html#subControlRect">subControlRect</a>() function.</p>
<p><b>See also </b><a href="qwidget.html#layoutDirection-prop">QWidget::layoutDirection</a>.</p>
<!-- @@@visualRect -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>