# QStyle Class Reference
## [[QtGui](index.htm) module]
該的QStyle類是封裝了圖形用戶界面的外觀和感覺的抽象基類。[More...](#details)
繼承[QObject](qobject.html)。
通過繼承[QCommonStyle](qcommonstyle.html)。
### Types
* `enum ComplexControl { CC_SpinBox, CC_ComboBox, CC_ScrollBar, CC_Slider, ..., CC_CustomBase }`
* `enum ContentsType { CT_PushButton, CT_CheckBox, CT_RadioButton, CT_ToolButton, ..., CT_CustomBase }`
* `enum ControlElement { CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabel, CE_CheckBox, ..., CE_CustomBase }`
* `enum PixelMetric { PM_ButtonMargin, PM_ButtonDefaultIndicator, PM_MenuButtonIndicator, PM_ButtonShiftHorizontal, ..., PM_CustomBase }`
* `enum PrimitiveElement { PE_Q3CheckListController, PE_Q3CheckListExclusiveIndicator, PE_Q3CheckListIndicator, PE_Q3DockWindowSeparator, ..., PE_CustomBase }`
* `enum RequestSoftwareInputPanel { RSIP_OnMouseClickAndAlreadyFocused, RSIP_OnMouseClick }`
* `enum StandardPixmap { SP_TitleBarMenuButton, SP_TitleBarMinButton, SP_TitleBarMaxButton, SP_TitleBarCloseButton, ..., SP_CustomBase }`
* `class **[State](index.htm)**`
* `enum StateFlag { State_None, State_Enabled, State_Raised, State_Sunken, ..., State_Mini }`
* `enum StyleHint { SH_EtchDisabledText, SH_DitherDisabledText, SH_ScrollBar_MiddleClickAbsolutePosition, SH_ScrollBar_ScrollWhenPointerLeavesControl, ..., SH_CustomBase }`
* `enum SubControl { SC_None, SC_ScrollBarAddLine, SC_ScrollBarSubLine, SC_ScrollBarAddPage, ..., SC_All }`
* `class **[SubControls](index.htm)**`
* `enum SubElement { SE_PushButtonContents, SE_PushButtonFocusRect, SE_CheckBoxIndicator, SE_CheckBoxContents, ..., SE_CustomBase }`
### Methods
* `__init__ (self)`
* `int combinedLayoutSpacing (self, QSizePolicy.ControlTypes?controls1, QSizePolicy.ControlTypes?controls2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `drawComplexControl (self, ComplexControl?cc, QStyleOptionComplex?opt, QPainter?p, QWidget?widget?=?None)`
* `drawControl (self, ControlElement?element, QStyleOption?opt, QPainter?p, QWidget?widget?=?None)`
* `drawItemPixmap (self, QPainter?painter, QRect?rect, int?alignment, QPixmap?pixmap)`
* `drawItemText (self, QPainter?painter, QRect?rectangle, int?alignment, QPalette?palette, bool?enabled, QString?text, QPalette.ColorRole?textRole?=?QPalette.NoRole)`
* `drawPrimitive (self, PrimitiveElement?pe, QStyleOption?opt, QPainter?p, QWidget?widget?=?None)`
* `QPixmap generatedIconPixmap (self, QIcon.Mode?iconMode, QPixmap?pixmap, QStyleOption?opt)`
* `SubControl hitTestComplexControl (self, ComplexControl?cc, QStyleOptionComplex?opt, QPoint?pt, QWidget?widget?=?None)`
* `QRect itemPixmapRect (self, QRect?r, int?flags, QPixmap?pixmap)`
* `QRect itemTextRect (self, QFontMetrics?fm, QRect?r, int?flags, bool?enabled, QString?text)`
* `int layoutSpacing (self, QSizePolicy.ControlType?control1, QSizePolicy.ControlType?control2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `int layoutSpacingImplementation (self, QSizePolicy.ControlType?control1, QSizePolicy.ControlType?control2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `int pixelMetric (self, PixelMetric?metric, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `polish (self, QWidget)`
* `polish (self, QApplication)`
* `QPalette polish (self, QPalette)`
* `QStyle proxy (self)`
* `QSize sizeFromContents (self, ContentsType?ct, QStyleOption?opt, QSize?contentsSize, QWidget?widget?=?None)`
* `QIcon standardIcon (self, StandardPixmap?standardIcon, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `QIcon standardIconImplementation (self, StandardPixmap?standardIcon, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `QPalette standardPalette (self)`
* `QPixmap standardPixmap (self, StandardPixmap?standardPixmap, QStyleOption?option?=?None, QWidget?widget?=?None)`
* `int styleHint (self, StyleHint?stylehint, QStyleOption?option?=?None, QWidget?widget?=?None, QStyleHintReturn?returnData?=?None)`
* `QRect subControlRect (self, ComplexControl?cc, QStyleOptionComplex?opt, SubControl?sc, QWidget?widget?=?None)`
* `QRect subElementRect (self, SubElement?subElement, QStyleOption?option, QWidget?widget?=?None)`
* `unpolish (self, QWidget)`
* `unpolish (self, QApplication)`
### Static Methods
* `QRect alignedRect (Qt.LayoutDirection?direction, Qt.Alignment?alignment, QSize?size, QRect?rectangle)`
* `int sliderPositionFromValue (int?min, int?max, int?logicalValue, int?span, bool?upsideDown?=?False)`
* `int sliderValueFromPosition (int?min, int?max, int?position, int?span, bool?upsideDown?=?False)`
* `Qt.Alignment visualAlignment (Qt.LayoutDirection?direction, Qt.Alignment?alignment)`
* `QPoint visualPos (Qt.LayoutDirection?direction, QRect?boundingRect, QPoint?logicalPos)`
* `QRect visualRect (Qt.LayoutDirection?direction, QRect?boundingRect, QRect?logicalRect)`
* * *
## Detailed Description
該的QStyle類是封裝了圖形用戶界面的外觀和感覺的抽象基類。
Qt的包含一組的QStyle子類,模擬的Qt所支持的不同平臺的風格([QWindowsStyle](index.htm),[QMacStyle](index.htm),[QMotifStyle](index.htm)等)。默認情況下,這些樣式都內置在[QtGui](index.htm)庫。樣式也可制成可作為插件。
Qt的內建窗體使用的QStyle來執行幾乎所有的圖紙,確保它們看起來確實很像相當于原生窗口部件。下圖顯示了一個[QComboBox](qcombobox.html)在八個不同的風格。

主題:
### Setting a Style
整個應用程序的樣式可使用設置[QApplication.setStyle](qapplication.html#setStyle)()函數。它也可以由應用程序的用戶指定的,使用`-style`命令行選項:
```
./myapplication -style motif
```
如果沒有指定樣式, Qt會選擇最合適的風格,為用戶的平臺或桌面環境。
對單個部件使用的樣式,也可以設置在[QWidget.setStyle](qwidget.html#setStyle)()函數。
### Developing Style-Aware Custom Widgets
如果您正在開發自定義的小部件,并要他們好看在所有平臺上,你可以使用的QStyle函數來執行部件的部件圖紙,如[drawItemText](qstyle.html#drawItemText)( )[drawItemPixmap](qstyle.html#drawItemPixmap)( )[drawPrimitive](qstyle.html#drawPrimitive)( )[drawControl](qstyle.html#drawControl)()和[drawComplexControl](qstyle.html#drawComplexControl)( ) 。
大多數的QStyle繪制函數需要四個參數:
* an enum value specifying which graphical element to draw
* a [QStyleOption](qstyleoption.html) specifying how and where to render that element
* a [QPainter](qpainter.html) that should be used to draw the element
* a [QWidget](qwidget.html) on which the drawing is performed (optional)
例如,如果你想畫一個焦點矩形上的小部件,你可以這樣寫:
```
void MyWidget.paintEvent([QPaintEvent](qpaintevent.html) * /* event */)
{
[QPainter](qpainter.html) painter(this);
[QStyleOptionFocusRect](qstyleoptionfocusrect.html) option;
option.initFrom(this);
option.backgroundColor = palette().color([QPalette](qpalette.html).Background);
style()->drawPrimitive(QStyle.PE_FrameFocusRect, &option, &painter, this);
}
```
的QStyle得到所有它需要從渲染的圖形元素的信息[QStyleOption](qstyleoption.html)。窗口小部件是通過作為在殼體的最后一個參數的樣式需要它來執行特殊效果(例如Mac OS X上的動畫默認的按鈕),但它不是必需的。事實上,你可以使用的QStyle繪制在任何繪圖設備,不只是小部件,通過設置[QPainter](qpainter.html)正常。
[QStyleOption](qstyleoption.html)具有各種子類的各種類型的圖形元素可以被繪制。例如,[PE_FrameFocusRect](qstyle.html#PrimitiveElement-enum)預計[QStyleOptionFocusRect](qstyleoptionfocusrect.html)的說法。
以確保繪圖操作是盡可能快地,[QStyleOption](qstyleoption.html)和它的子類有公共數據成員。請參閱[QStyleOption](qstyleoption.html)類文檔,了解有關如何使用它的詳細信息。
為方便起見, Qt提供了[QStylePainter](qstylepainter.html)類,它結合了的QStyle ,一[QPainter](qpainter.html)和[QWidget](qwidget.html)。這使得它可以寫
```
[QStylePainter](qstylepainter.html) painter(this);
...
painter.drawPrimitive(QStyle.PE_FrameFocusRect, option);
```
而不是
```
[QPainter](qpainter.html) painter(this);
...
style()->drawPrimitive(QStyle.PE_FrameFocusRect, &option, &painter, this);
```
### Creating a Custom Style
您可以創建自定義的外觀,并通過創建一個自定義樣式感覺為您的應用。有兩種方法可以創建一個自定義樣式。在靜態方法中,您既可以選擇一個現有的QStyle類,繼承它,并重新實現虛函數提供自定義行為,或者你從頭創建一個完整的QStyle類。在動態的方法,你修改你的系統風格在運行時的行為。下方的靜電的方法進行說明。動態方法的描述[QProxyStyle](index.htm)。
在靜態方法的第一步是挑選而提供的Qt從中你將建立您的自定義樣式的樣式之一。您選擇的QStyle類將取決于其風格酷似你想要的風格最。你可以作為一個基地使用最普遍的類是[QCommonStyle](qcommonstyle.html)(不是的QStyle ) 。這是因為Qt的要求它的風格是[QCommonStyle](qcommonstyle.html)秒。
這取決于你想改變的基本樣式的哪些部分,你必須重新實現用來繪制界面的部分功能。為了說明這一點,我們將通過修改繪制的旋轉框箭頭的外觀[QWindowsStyle](index.htm)。箭在_primitive elements_由該畫[drawPrimitive](qstyle.html#drawPrimitive)( )函數,所以我們需要重新實現該功能。我們需要下面的類聲明:
```
class CustomStyle : public [QWindowsStyle](index.htm)
{
Q_OBJECT
public:
CustomStyle()
~CustomStyle() {}
void drawPrimitive(PrimitiveElement element, const [QStyleOption](qstyleoption.html) *option,
[QPainter](qpainter.html) *painter, const [QWidget](qwidget.html) *widget) const;
};
```
要繪制它的向上和向下箭頭,[QSpinBox](qspinbox.html)使用[PE_IndicatorSpinUp](qstyle.html#PrimitiveElement-enum)和[PE_IndicatorSpinDown](qstyle.html#PrimitiveElement-enum)基本元素。以下是如何重新實現[drawPrimitive](qstyle.html#drawPrimitive)( )函數以不同的方式吸引他們:
```
void CustomStyle.drawPrimitive(PrimitiveElement element, const [QStyleOption](qstyleoption.html) *option,
[QPainter](qpainter.html) *painter, const [QWidget](qwidget.html) *widget) const
{
if (element == PE_IndicatorSpinUp || element == PE_IndicatorSpinDown) {
[QPolygon](qpolygon.html) points(3);
int x = option->rect.x();
int y = option->rect.y();
int w = option->rect.width() / 2;
int h = option->rect.height() / 2;
x += (option->rect.width() - w) / 2;
y += (option->rect.height() - h) / 2;
if (element == PE_IndicatorSpinUp) {
points[0] = [QPoint](qpoint.html)(x, y + h);
points[1] = [QPoint](qpoint.html)(x + w, y + h);
points[2] = [QPoint](qpoint.html)(x + w / 2, y);
} else { // PE_SpinBoxDown
points[0] = [QPoint](qpoint.html)(x, y);
points[1] = [QPoint](qpoint.html)(x + w, y);
points[2] = [QPoint](qpoint.html)(x + w / 2, y + h);
}
if (option->state & State_Enabled) {
painter->setPen(option->palette.mid().color());
painter->setBrush(option->palette.buttonText());
} else {
painter->setPen(option->palette.buttonText().color());
painter->setBrush(option->palette.mid());
}
painter->drawPolygon(points);
} else {
[QWindowsStyle](index.htm).drawPrimitive(element, option, painter, widget);
}
}
```
請注意,我們不使用`widget`的說法,除了它傳遞給QWindowStyle.drawPrimitive ( )函數。如前所述,關于什么是要繪制的信息和應該如何被繪制由指定[QStyleOption](qstyleoption.html)對象,所以沒有必要問窗口小部件。
如果你需要使用`widget`參數以獲得更多的信息,請小心,以確保它不為0 ,并且它是正確類型的使用它。例如:
```
[QSpinBox](qspinbox.html) *spinBox = qobject_cast<[QSpinBox](qspinbox.html) *>(widget);
if (spinBox) {
...
}
```
在實現自定義風格,你不能假設的部件是一個[QSpinBox](qspinbox.html)只是因為枚舉值稱為[PE_IndicatorSpinUp](qstyle.html#PrimitiveElement-enum) or [PE_IndicatorSpinDown](qstyle.html#PrimitiveElement-enum)。
該文檔為[Styles](index.htm)例如涵蓋更詳細這個話題。
**Warning:**目前不支持Qt的樣式表定制的QStyle子類。我們計劃在未來的版本解決這個問題。
### Using a Custom Style
有在Qt的應用程序中使用自定義樣式的幾種方法。最簡單的方法是將自定義樣式傳遞給[QApplication.setStyle](qapplication.html#setStyle)( )之前創建靜態函數[QApplication](qapplication.html)對象:
```
#include <QtGui>
#include "customstyle.h"
int main(int argc, char *argv[])
{
[QApplication](qapplication.html).setStyle(new CustomStyle);
[QApplication](qapplication.html) app(argc, argv);
[QSpinBox](qspinbox.html) spinBox;
spinBox.show();
return app.exec();
}
```
您可以致電[QApplication.setStyle](qapplication.html#setStyle)( )在任何時間,而是由構造函數之前調用它,可以確保用戶的喜好,使用設置`-style`命令行選項,被尊重。
您可能想使你的自定義樣式可用于其他應用程序,這可能不是你的,因此不適用于你重新編譯使用。 Qt的插件系統,使得它可以創建樣式的插件。創建為插件樣式加載在運行時共享對象由Qt本身。請參閱[Qt Plugin](index.htm)文檔以獲取有關如何去創造一個風格插件的更多信息。
編譯你的插件,并把它放到Qt的`plugins/styles`目錄。我們現在有一個可插拔的風格, Qt可以自動加載。使用新的風格與現有的應用程序,只需啟動該應用程序具有以下參數:
```
./myapplication -style custom
```
該應用程序將使用的外觀和你實現的自定義樣式感覺。
### Right-to-Left Desktops
由右至左(如阿拉伯語和希伯來語)的書面語言通常也反映部件的整體布局,并要求光來自于屏幕的右上角,而不是左上角。
如果您創建自定義樣式,你應該繪制對稱元素時,確保他們也期待正確的鏡像布局要特別小心。一個簡單的方法來測試你的風格是運行的應用程序`-reverse`命令行選項或致電[QApplication.setLayoutDirection](qapplication.html#layoutDirection-prop)( )在你的`main()`功能。
這里有一些事情在一個從右到左的環境使得一個良好的工作作風時要牢記:
* [subControlRect](qstyle.html#subControlRect)() and [subElementRect](qstyle.html#subElementRect)() return rectangles in screen coordinates
* [QStyleOption.direction](qstyleoption.html#direction-var) indicates in which direction the item should be drawn in
* If a style is not right-to-left aware it will display items as if it were left-to-right
* [visualRect](qstyle.html#visualRect)(), [visualPos](qstyle.html#visualPos)(), and [visualAlignment](qstyle.html#visualAlignment)() are helpful functions that will translate from logical to screen representations.
* [alignedRect](qstyle.html#alignedRect)() will return a logical rect aligned for the current direction
### Styles in Item Views
項目的意見,這幅畫是由委讬進行的。 Qt的默認的委讬,[QStyledItemDelegate](qstyleditemdelegate.html),也可用于為計算項的邊界矩形,并且其子元素的各種項目類[data roles](qt.html#ItemDataRole-enum) [QStyledItemDelegate](qstyleditemdelegate.html)支持。請參閱[QStyledItemDelegate](qstyleditemdelegate.html)類的描述,以找出哪些數據類型和角色的支持。你可以閱讀更多有關項目數據的角色[Model/View Programming](index.htm)。
When [QStyledItemDelegate](qstyleditemdelegate.html)描繪它的項目,它吸引[CE_ItemViewItem](qstyle.html#ControlElement-enum),并計算其大小與[CT_ItemViewItem](qstyle.html#ContentsType-enum)。還需要注意的是,它使用[SE_ItemViewItemText](qstyle.html#SubElement-enum)設置編輯器的大小。當實現一個風格來定制的項目視圖繪制,你需要檢查的實施[QCommonStyle](qcommonstyle.html)(以及任何其他子類從它自己的風格繼承) 。這樣,你找出哪些以及如何等風格元素都畫,然后就可以重新實現元素的繪畫,應該可以得出不同。
我們有一個小例子,我們自定義的項目背景的繪制。
```
switch (element) {
case (PE_PanelItemViewItem): {
painter->save();
[QPoint](qpoint.html) topLeft = option->rect.topLeft();
[QPoint](qpoint.html) bottomRight = option->rect.topRight();
[QLinearGradient](qlineargradient.html) backgroundGradient(topLeft, bottomRight);
backgroundGradient.setColorAt(0.0, [QColor](qcolor.html)([Qt](qt.html).yellow).lighter(190));
backgroundGradient.setColorAt(1.0, [Qt](qt.html).white);
painter->fillRect(option->rect, [QBrush](qbrush.html)(backgroundGradient));
painter->restore();
break;
}
default:
[QWindowsStyle](index.htm).drawPrimitive(element, option, painter, widget);
}
```
原始元素[PE_PanelItemViewItem](qstyle.html#PrimitiveElement-enum)負責繪制項目的背景,并從被稱為[QCommonStyle](qcommonstyle.html)的實施[CE_ItemViewItem](qstyle.html#ControlElement-enum)。
以添加新的數據類型和項目數據繪制角色的支持,就必須創建一個自定義的委讬。但是如果你只需要支持默認的委讬實現的數據類型,自定義樣式并不需要一個伴隨委讬。該[QStyledItemDelegate](qstyleditemdelegate.html)類的描述給出了自定義的委讬的更多信息。
項目視圖標題的圖紙也由式進行,得到過的標題項目以及行和列的尺寸的尺寸控制。
* * *
## Type Documentation
```
QStyle.ComplexControl
```
這個枚舉變量描述了可用的復雜控制。復雜的控件具有不同的行為取決于所在的用戶點擊他們或哪個鍵被按下。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.CC_SpinBox` | `0` | 一個紡紗器,像[QSpinBox](qspinbox.html)。 |
| `QStyle.CC_ComboBox` | `1` | 一個組合框,像[QComboBox](qcombobox.html)。 |
| `QStyle.CC_ScrollBar` | `2` | 滾動條,像[QScrollBar](qscrollbar.html)。 |
| `QStyle.CC_Slider` | `3` | 滑塊,像[QSlider](qslider.html)。 |
| `QStyle.CC_ToolButton` | `4` | 工具按鈕,如[QToolButton](qtoolbutton.html)。 |
| `QStyle.CC_TitleBar` | `5` | 標題欄,像那些在使用[QMdiSubWindow](qmdisubwindow.html)。 |
| `QStyle.CC_Q3ListView` | `6` | 用于繪制[Q3ListView](index.htm)類。 |
| `QStyle.CC_GroupBox` | `8` | 一組中,像[QGroupBox](qgroupbox.html)。 |
| `QStyle.CC_Dial` | `7` | 撥號一樣[QDial](qdial.html)。 |
| `QStyle.CC_MdiControls` | `9` | 該在一個最大化的MDI子窗口的菜單欄最小化,關閉,和普通按鈕。 |
| `QStyle.CC_CustomBase` | `0xf0000000` | 自定義復雜的控件的基值。自定義的值必須大于該值。 |
**See also** [SubControl](qstyle.html#SubControl-enum)和[drawComplexControl](qstyle.html#drawComplexControl)( ) 。
```
QStyle.ContentsType
```
這個枚舉變量描述了可用的內容類型。這些被用于計算尺寸為各種部件的內容。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.CT_CheckBox` | `1` | 復選框,像[QCheckBox](qcheckbox.html)。 |
| `QStyle.CT_ComboBox` | `4` | 組合框,像[QComboBox](qcombobox.html)。 |
| `QStyle.CT_Q3DockWindow` | `6` | A [Q3DockWindow](index.htm)。 |
| `QStyle.CT_HeaderSection` | `21` | 一個頭節,就像[QHeader](index.htm#qheader)。 |
| `QStyle.CT_LineEdit` | `16` | A線編輯一樣[QLineEdit](qlineedit.html)。 |
| `QStyle.CT_Menu` | `11` | 一個菜單,像[QMenu](qmenu.html)。 |
| `QStyle.CT_Q3Header` | `15` | 一個Qt的3頭部分,像[Q3Header](index.htm)。 |
| `QStyle.CT_MenuBar` | `10` | 菜單欄,就像[QMenuBar](qmenubar.html)。 |
| `QStyle.CT_MenuBarItem` | `9` | 菜單欄項目,就像在一個按鈕[QMenuBar](qmenubar.html)。 |
| `QStyle.CT_MenuItem` | `8` | 的菜單項,如[QMenuItem](index.htm)。 |
| `QStyle.CT_ProgressBar` | `7` | 一個進度條,就像[QProgressBar](qprogressbar.html)。 |
| `QStyle.CT_PushButton` | `0` | 一個按鈕,像[QPushButton](qpushbutton.html)。 |
| `QStyle.CT_RadioButton` | `2` | 單選按鈕,如[QRadioButton](qradiobutton.html)。 |
| `QStyle.CT_SizeGrip` | `18` | 大小抓地力,像[QSizeGrip](qsizegrip.html)。 |
| `QStyle.CT_Slider` | `13` | 滑塊,像[QSlider](qslider.html)。 |
| `QStyle.CT_ScrollBar` | `14` | 滾動條,像[QScrollBar](qscrollbar.html)。 |
| `QStyle.CT_SpinBox` | `17` | 旋轉框,像[QSpinBox](qspinbox.html)。 |
| `QStyle.CT_Splitter` | `5` | 分路器,像[QSplitter](qsplitter.html)。 |
| `QStyle.CT_TabBarTab` | `12` | 在標籤欄,就像一個標籤[QTabBar](qtabbar.html)。 |
| `QStyle.CT_TabWidget` | `19` | 一個標籤控件,如[QTabWidget](qtabwidget.html)。 |
| `QStyle.CT_ToolButton` | `3` | 工具按鈕,如[QToolButton](qtoolbutton.html)。 |
| `QStyle.CT_GroupBox` | `22` | 一組中,像[QGroupBox](qgroupbox.html)。 |
| `QStyle.CT_ItemViewItem` | `24` | 項目視圖中的項目。 |
| `QStyle.CT_CustomBase` | `0xf0000000` | 自定義內容類型的基礎值。自定義的值必須大于該值。 |
| `QStyle.CT_MdiControls` | `23` | 最小化,正常,并在一個最大化的MDI子窗口菜單欄中的關閉按鈕。 |
**See also** [sizeFromContents](qstyle.html#sizeFromContents)( ) 。
```
QStyle.ControlElement
```
這個枚舉表示的控制元件。控制元素是一個小部件,它執行到用戶的某些操作或顯示信息的一部分。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.CE_PushButton` | `0` | A [QPushButton](qpushbutton.html),吸引CE_PushButtonBevel , CE_PushButtonLabel和[PE_FrameFocusRect](qstyle.html#PrimitiveElement-enum)。 |
| `QStyle.CE_PushButtonBevel` | `1` | 的斜面和默認指標[QPushButton](qpushbutton.html)。 |
| `QStyle.CE_PushButtonLabel` | `2` | 標籤(用文字或像素圖的圖標)的[QPushButton](qpushbutton.html)。 |
| `QStyle.CE_DockWidgetTitle` | `31` | 塢窗口標題。 |
| `QStyle.CE_Splitter` | `29` | 分配器手柄;也見[QSplitter](qsplitter.html)。 |
| `QStyle.CE_CheckBox` | `3` | A [QCheckBox](qcheckbox.html),繪制[PE_IndicatorCheckBox](qstyle.html#PrimitiveElement-enum),一個CE_CheckBoxLabel和[PE_FrameFocusRect](qstyle.html#PrimitiveElement-enum)。 |
| `QStyle.CE_CheckBoxLabel` | `4` | 的標籤(文本或像素圖)[QCheckBox](qcheckbox.html)。 |
| `QStyle.CE_RadioButton` | `5` | A [QRadioButton](qradiobutton.html),繪制[PE_IndicatorRadioButton](qstyle.html#PrimitiveElement-enum),一個CE_RadioButtonLabel和[PE_FrameFocusRect](qstyle.html#PrimitiveElement-enum)。 |
| `QStyle.CE_RadioButtonLabel` | `6` | 的標籤(文本或像素圖)[QRadioButton](qradiobutton.html)。 |
| `QStyle.CE_TabBarTab` | `7` | 在一個標籤和標籤[QTabBar](qtabbar.html)。 |
| `QStyle.CE_TabBarTabShape` | `8` | 標籤欄在該選項卡的形狀。 |
| `QStyle.CE_TabBarTabLabel` | `9` | 標籤內的標籤。 |
| `QStyle.CE_ProgressBar` | `10` | A [QProgressBar](qprogressbar.html),吸引CE_ProgressBarGroove , CE_ProgressBarContents和CE_ProgressBarLabel 。 |
| `QStyle.CE_ProgressBarGroove` | `11` | 其中進度指示器繪制在一個凹槽[QProgressBar](qprogressbar.html)。 |
| `QStyle.CE_ProgressBarContents` | `12` | 的進度指示器[QProgressBar](qprogressbar.html)。 |
| `QStyle.CE_ProgressBarLabel` | `13` | 的文本標籤[QProgressBar](qprogressbar.html)。 |
| `QStyle.CE_ToolButtonLabel` | `22` | 工具按鈕的標籤。 |
| `QStyle.CE_MenuBarItem` | `20` | 在一個菜單項[QMenuBar](qmenubar.html)。 |
| `QStyle.CE_MenuBarEmptyArea` | `21` | 的空白區域[QMenuBar](qmenubar.html)。 |
| `QStyle.CE_MenuItem` | `14` | 在一個菜單項[QMenu](qmenu.html)。 |
| `QStyle.CE_MenuScroller` | `15` | 在滾動區域[QMenu](qmenu.html)當樣式支持滾動。 |
| `QStyle.CE_MenuTearoff` | `18` | 代表一個撕紙節的菜單項[QMenu](qmenu.html)。 |
| `QStyle.CE_MenuEmptyArea` | `19` | 在菜單區域沒有菜單項。 |
| `QStyle.CE_MenuHMargin` | `17` | 在菜單的左/右的水平額外的空間。 |
| `QStyle.CE_MenuVMargin` | `16` | 在菜單的頂部/底部的垂直額外的空間。 |
| `QStyle.CE_Q3DockWindowEmptyArea` | `26` | 的空白區域[QDockWidget](qdockwidget.html)。 |
| `QStyle.CE_ToolBoxTab` | `27` | 在一個工具箱中的選項卡和標籤[QToolBox](qtoolbox.html)。 |
| `QStyle.CE_SizeGrip` | `28` | 窗口大小調整手柄,還見[QSizeGrip](qsizegrip.html)。 |
| `QStyle.CE_Header` | `23` | 一個頭。 |
| `QStyle.CE_HeaderSection` | `24` | 標題部分。 |
| `QStyle.CE_HeaderLabel` | `25` | 標題的標籤。 |
| `QStyle.CE_ScrollBarAddLine` | `32` | 滾動條線增加的指標。 (即,向下滾動) ;也見[QScrollBar](qscrollbar.html)。 |
| `QStyle.CE_ScrollBarSubLine` | `33` | 滾動條線下降的指標(即,向上滾動) 。 |
| `QStyle.CE_ScrollBarAddPage` | `34` | Scolllbar page increase indicator (i.e., page down). |
| `QStyle.CE_ScrollBarSubPage` | `35` | 滾動條的頁面下降的指標(即向上翻頁) 。 |
| `QStyle.CE_ScrollBarSlider` | `36` | 滾動條滑塊。 |
| `QStyle.CE_ScrollBarFirst` | `37` | 滾動條的第一線指標(即家庭) 。 |
| `QStyle.CE_ScrollBarLast` | `38` | 滾動條最后一行的指標(即結束) 。 |
| `QStyle.CE_RubberBand` | `30` | 橡皮筋用于例如圖標視圖。 |
| `QStyle.CE_FocusFrame` | `39` | 聚焦框就是樣式控制。 |
| `QStyle.CE_ItemViewItem` | `46` | 項目視圖中的項目。 |
| `QStyle.CE_CustomBase` | `0xf0000000` | 自定義控制元件的基值;自定義值必須大于該值。 |
| `QStyle.CE_ComboBoxLabel` | `40` | 的一個不可編輯的標籤[QComboBox](qcombobox.html)。 |
| `QStyle.CE_ToolBar` | `41` | 喜歡的工具欄[QToolBar](qtoolbar.html)。 |
| `QStyle.CE_ToolBoxTabShape` | `42` | 工具箱的標籤形狀。 |
| `QStyle.CE_ToolBoxTabLabel` | `43` | 工具箱的選項卡標籤。 |
| `QStyle.CE_HeaderEmptyArea` | `44` | 如無頭部分的標題視圖的區域。 |
| `QStyle.CE_ShapedFrame` | `47` | 在指定的形狀的框[QStyleOptionFrameV3](qstyleoptionframev3.html)見[QFrame](qframe.html)。 |
**See also** [drawControl](qstyle.html#drawControl)( ) 。
```
QStyle.PixelMetric
```
這個枚舉變量描述了各種可用的像素指標。像素度量是由一個單一的像素值所代表的風格取決于大小。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.PM_ButtonMargin` | `0` | 按鈕標籤和幀之間的空白量。 |
| `QStyle.PM_DockWidgetTitleBarButtonMargin` | ? | 基座部件的標題欄按鈕標籤和幀之間的空白量。 |
| `QStyle.PM_ButtonDefaultIndicator` | `1` | 寬度默認按鈕指示燈框架。 |
| `QStyle.PM_MenuButtonIndicator` | `2` | 寬度菜單按鈕指示燈成正比的窗口小部件的高度。 |
| `QStyle.PM_ButtonShiftHorizontal` | `3` | 一鍵橫內容換擋時的按鈕已關閉。 |
| `QStyle.PM_ButtonShiftVertical` | `4` | 一鍵垂直內容換擋時的按鈕已關閉。 |
| `QStyle.PM_DefaultFrameWidth` | `5` | 默認幀寬度(通常為2) 。 |
| `QStyle.PM_SpinBoxFrameWidth` | `6` | 邊框寬度微調框的,默認為PM_DefaultFrameWidth 。 |
| `QStyle.PM_ComboBoxFrameWidth` | `7` | 邊框寬度組合框,默認為PM_DefaultFrameWidth 。 |
| `QStyle.PM_MDIFrameWidth` | `PM_MdiSubWindowFrameWidth` | 已過時。使用PM_MdiSubWindowFrameWidth代替。 |
| `QStyle.PM_MdiSubWindowFrameWidth` | `46` | 車架寬度的MDI子窗口。 |
| `QStyle.PM_MDIMinimizedWidth` | `PM_MdiSubWindowMinimizedWidth` | 已過時。使用PM_MdiSubWindowMinimizedWidth代替。 |
| `QStyle.PM_MdiSubWindowMinimizedWidth` | ? | 寬度最小化的MDI子窗口。 |
| `QStyle.PM_LayoutLeftMargin` | ? | 默認[left margin](qlayout.html#setContentsMargins)一[QLayout](qlayout.html)。 |
| `QStyle.PM_LayoutTopMargin` | ? | 默認[top margin](qlayout.html#setContentsMargins)一[QLayout](qlayout.html)。 |
| `QStyle.PM_LayoutRightMargin` | ? | 默認[right margin](qlayout.html#setContentsMargins)一[QLayout](qlayout.html)。 |
| `QStyle.PM_LayoutBottomMargin` | ? | 默認[bottom margin](qlayout.html#setContentsMargins)一[QLayout](qlayout.html)。 |
| `QStyle.PM_LayoutHorizontalSpacing` | ? | 默認[horizontal spacing](qlayout.html#spacing-prop)一[QLayout](qlayout.html)。 |
| `QStyle.PM_LayoutVerticalSpacing` | ? | 默認[vertical spacing](qlayout.html#spacing-prop)一[QLayout](qlayout.html)。 |
| `QStyle.PM_MaximumDragDistance` | `8` | 鼠標并拖動時,滾動條之間的最大允許距離。超過指定距離將導致滑塊跳回原來的位置;值-1將禁用此行為。 |
| `QStyle.PM_ScrollBarExtent` | `9` | 寬度垂直滾動條和水平滾動條的高度。 |
| `QStyle.PM_ScrollBarSliderMin` | `10` | 垂直滾動條的滑塊和水平滾動條的滑塊的最小寬度的最小高度。 |
| `QStyle.PM_SliderThickness` | `11` | 總滑塊厚度。 |
| `QStyle.PM_SliderControlThickness` | `12` | 厚度滑塊手柄。 |
| `QStyle.PM_SliderLength` | `13` | 滑塊的長度。 |
| `QStyle.PM_SliderTickmarkOffset` | `14` | 在該tickmarks和滑塊之間的偏移量。 |
| `QStyle.PM_SliderSpaceAvailable` | `15` | 用于將滑塊移動至的可用空間。 |
| `QStyle.PM_DockWidgetSeparatorExtent` | `16` | 寬度在水平塢窗口,并在一個垂直錨接窗口的隔板的高度的隔板的。 |
| `QStyle.PM_DockWidgetHandleExtent` | `17` | 寬度手柄在水平塢窗口和手柄在垂直錨接窗口的高度。 |
| `QStyle.PM_DockWidgetFrameWidth` | `18` | 邊框寬度碼頭窗口。 |
| `QStyle.PM_DockWidgetTitleMargin` | ? | 保證金的錨接窗口的標題。 |
| `QStyle.PM_MenuBarPanelWidth` | `33` | 車架寬度的菜單欄,默認為PM_DefaultFrameWidth 。 |
| `QStyle.PM_MenuBarItemSpacing` | `34` | 菜單欄項目之間的間距。 |
| `QStyle.PM_MenuBarHMargin` | `36` | 菜單欄項和酒吧的左/右之間的間距。 |
| `QStyle.PM_MenuBarVMargin` | `35` | 菜單欄項和酒吧的頂部/底部之間的間距。 |
| `QStyle.PM_ToolBarFrameWidth` | ? | 寬度大約工具欄的框架。 |
| `QStyle.PM_ToolBarHandleExtent` | ? | 寬度在水平工具欄和手柄在垂直工具欄的高度的工具手柄。 |
| `QStyle.PM_ToolBarItemMargin` | ? | 工具欄框架和項目之間的間距。 |
| `QStyle.PM_ToolBarItemSpacing` | ? | 工具欄項之間的間距。 |
| `QStyle.PM_ToolBarSeparatorExtent` | ? | 寬度在水平工具欄和在垂直工具欄的隔板的高度的工具欄分隔的。 |
| `QStyle.PM_ToolBarExtensionExtent` | ? | 在水平工具欄和按鈕在垂直工具欄的高度寬度的延伸工具欄按鈕。 |
| `QStyle.PM_TabBarTabOverlap` | `19` | 像素標籤應重疊數。 (目前僅適用于風格,不內[QTabBar](qtabbar.html)) |
| `QStyle.PM_TabBarTabHSpace` | `20` | 額外的空間添加到選項卡的寬度。 |
| `QStyle.PM_TabBarTabVSpace` | `21` | 額外的空間添加到選項卡的高度。 |
| `QStyle.PM_TabBarBaseHeight` | `22` | 標籤欄和標籤頁之間的區域的高度。 |
| `QStyle.PM_TabBarBaseOverlap` | `23` | 像素數的標籤欄重疊標籤欄的基礎。 |
| `QStyle.PM_TabBarScrollButtonWidth` | ? | ? |
| `QStyle.PM_TabBarTabShiftHorizontal` | ? | 當選擇了選項卡的水平像素偏移。 |
| `QStyle.PM_TabBarTabShiftVertical` | ? | 當選擇了選項卡垂直像素移位。 |
| `QStyle.PM_ProgressBarChunkWidth` | `24` | 在進度條指示寬度一大塊。 |
| `QStyle.PM_SplitterWidth` | `25` | 寬度分離器。 |
| `QStyle.PM_TitleBarHeight` | `26` | 標題欄的高度。 |
| `QStyle.PM_IndicatorWidth` | `37` | 寬度復選框指標。 |
| `QStyle.PM_IndicatorHeight` | `38` | 一個復選框指標的高度。 |
| `QStyle.PM_ExclusiveIndicatorWidth` | `39` | 寬度單選按鈕指示燈。 |
| `QStyle.PM_ExclusiveIndicatorHeight` | `40` | 單選按鈕指示燈的高度。 |
| `QStyle.PM_MenuPanelWidth` | `30` | 邊框寬度(應用在各方面)的[QMenu](qmenu.html)。 |
| `QStyle.PM_MenuHMargin` | `28` | 附加的邊界(在左側和右側中使用)為一個[QMenu](qmenu.html)。 |
| `QStyle.PM_MenuVMargin` | `29` | 對于一個額外的邊界(用于底部和頂部)[QMenu](qmenu.html)。 |
| `QStyle.PM_MenuScrollerHeight` | `27` | 在滾動區域的高度[QMenu](qmenu.html)。 |
| `QStyle.PM_MenuTearoffHeight` | `31` | 一撕斷區的高度[QMenu](qmenu.html)。 |
| `QStyle.PM_MenuDesktopFrameWidth` | `32` | 車架寬度為桌面上的菜單。 |
| `QStyle.PM_CheckListButtonSize` | `41` | 復選框/單選按鈕在一個區域(寬/高)[Q3CheckListItem](index.htm)。 |
| `QStyle.PM_CheckListControllerSize` | `42` | 在一個控制器的面積(寬度/高度)[Q3CheckListItem](index.htm)。 |
| `QStyle.PM_HeaderMarkSize` | ? | 在一個標題中的排序指示符的大小。 |
| `QStyle.PM_HeaderGripMargin` | ? | 調整大小握在頭的大小。 |
| `QStyle.PM_HeaderMargin` | ? | 排序指標與文本之間的空白的大小。 |
| `QStyle.PM_SpinBoxSliderHeight` | ? | 可選旋轉框滑塊的高度。 |
| `QStyle.PM_ToolBarIconSize` | ? | 默認情況下工具欄圖標大小 |
| `QStyle.PM_SmallIconSize` | ? | 默認小圖標大小 |
| `QStyle.PM_LargeIconSize` | ? | 默認大圖標大小 |
| `QStyle.PM_FocusFrameHMargin` | ? | 水平邊距的對焦框將開始小部件通過。 |
| `QStyle.PM_FocusFrameVMargin` | ? | 垂直邊距的對焦框將開始小部件通過。 |
| `QStyle.PM_IconViewIconSize` | ? | 默認大小為圖標視圖圖標。 |
| `QStyle.PM_ListViewIconSize` | ? | 的默認大小在列表視圖中的圖標。 |
| `QStyle.PM_ToolTipLabelFrameWidth` | ? | 車架寬度為一個工具提示標籤。 |
| `QStyle.PM_CheckBoxLabelSpacing` | ? | 一個復選框指標和標籤之間的間距。 |
| `QStyle.PM_RadioButtonLabelSpacing` | ? | 一個單選按鈕,指示燈和標籤之間的間距。 |
| `QStyle.PM_TabBarIconSize` | ? | 默認的圖標大小的標籤欄。 |
| `QStyle.PM_SizeGripSize` | ? | 的大小手柄的大小。 |
| `QStyle.PM_MessageBoxIconSize` | ? | 在消息框中的標準圖標的大小 |
| `QStyle.PM_ButtonIconSize` | ? | 按鈕圖標的默認大小 |
| `QStyle.PM_TextCursorWidth` | ? | 光標在一個行編輯或文字編輯的寬度 |
| `QStyle.PM_TabBar_ScrollButtonOverlap` | ? | 在標籤欄的左邊和右邊按鈕之間的距離。 |
| `QStyle.PM_TabCloseIndicatorWidth` | ? | 在標籤欄選項卡上的關閉按鈕的默認寬度。 |
| `QStyle.PM_TabCloseIndicatorHeight` | ? | 在標籤欄選項卡上的關閉按鈕的默認高度。 |
| `QStyle.PM_CustomBase` | `0xf0000000` | 對于自定義的像素指標基準值。自定義的值必須大于該值。 |
下面的值已過時:
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.PM_DefaultTopLevelMargin` | ? | 使用PM_LayoutLeftMargin , PM_LayoutTopMargin , PM_LayoutRightMargin和PM_LayoutBottomMargin代替。 |
| `QStyle.PM_DefaultChildMargin` | ? | 使用PM_LayoutLeftMargin , PM_LayoutTopMargin , PM_LayoutRightMargin和PM_LayoutBottomMargin代替。 |
| `QStyle.PM_DefaultLayoutSpacing` | ? | 使用PM_LayoutHorizontalSpacing和PM_LayoutVerticalSpacing代替。 |
| `QStyle.PM_ScrollView_ScrollBarSpacing` | ? | 框架和滾動條帶之間的距離[SH_ScrollView_FrameOnlyAroundContents](qstyle.html#StyleHint-enum)設置。 |
| `QStyle.PM_SubMenuOverlap` | ? | 子菜單與其父之間的水平重疊。 |
**See also** [pixelMetric](qstyle.html#pixelMetric)( ) 。
```
QStyle.PrimitiveElement
```
這個枚舉變量描述的各種基本元素。一個基本元素是一種常見的GUI元素,如復選框指示器或按鈕斜角。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.PE_FrameStatusBar` | `12` | 框架 |
| `QStyle.PE_PanelButtonCommand` | ? | 用于啟動一個動作,例如,一個按鈕[QPushButton](qpushbutton.html)。 |
| `QStyle.PE_FrameDefaultButton` | `6` | 圍繞這一個默認的按鈕外框,例如在對話框中。 |
| `QStyle.PE_PanelButtonBevel` | ? | 通用面板按鈕斜面。 |
| `QStyle.PE_PanelButtonTool` | ? | 面板上的工具按鈕,與使用[QToolButton](qtoolbutton.html)。 |
| `QStyle.PE_PanelLineEdit` | ? | 面板上的[QLineEdit](qlineedit.html)。 |
| `QStyle.PE_IndicatorButtonDropDown` | ? | 指示器為一個下拉按鈕,例如,一個工具按鈕,顯示一個菜單。 |
| `QStyle.PE_FrameFocusRect` | `8` | 通用的焦點指示符。 |
| `QStyle.PE_IndicatorArrowUp` | ? | 通用的向上箭頭。 |
| `QStyle.PE_IndicatorArrowDown` | ? | 一般的向下箭頭。 |
| `QStyle.PE_IndicatorArrowRight` | ? | 通用向右箭頭。 |
| `QStyle.PE_IndicatorArrowLeft` | ? | 通用向左箭頭。 |
| `QStyle.PE_IndicatorSpinUp` | ? | 向上的符號為一個自旋部件,例如一個[QSpinBox](qspinbox.html)。 |
| `QStyle.PE_IndicatorSpinDown` | ? | 下來符號兜風部件。 |
| `QStyle.PE_IndicatorSpinPlus` | ? | 增加符號旋轉部件。 |
| `QStyle.PE_IndicatorSpinMinus` | ? | 減少符號兜風部件。 |
| `QStyle.PE_IndicatorItemViewItemCheck` | `PE_IndicatorViewItemCheck` | 開/關指示燈的視圖項。 |
| `QStyle.PE_IndicatorCheckBox` | ? | 開/關指示器,例如,一個[QCheckBox](qcheckbox.html)。 |
| `QStyle.PE_IndicatorRadioButton` | ? | 專用的開/關指示器,例如,一個[QRadioButton](qradiobutton.html)。 |
| `QStyle.PE_Q3DockWindowSeparator` | `3` | 項分隔符為Qt 3兼容停靠窗口和工具欄的內容。 |
| `QStyle.PE_IndicatorDockWidgetResizeHandle` | ? | 調整手柄,停靠窗口。 |
| `QStyle.PE_Frame` | `5` | 通用幀 |
| `QStyle.PE_FrameMenu` | `11` | 框架的彈出窗口/菜單;也看到[QMenu](qmenu.html)。 |
| `QStyle.PE_PanelMenuBar` | ? | 面板菜單欄。 |
| `QStyle.PE_PanelScrollAreaCorner` | ? | 面板右下角(或左下角)一個滾動區域的一角。 |
| `QStyle.PE_FrameDockWidget` | `7` | 面板框的停靠窗口和工具欄。 |
| `QStyle.PE_FrameTabWidget` | ? | 幀標籤的部件。 |
| `QStyle.PE_FrameLineEdit` | `10` | 線路板框架編輯。 |
| `QStyle.PE_FrameGroupBox` | `9` | 圍繞組框面板框架。 |
| `QStyle.PE_FrameButtonBevel` | ? | 面板框架的一個按鈕傘。 |
| `QStyle.PE_FrameButtonTool` | ? | 面板框架的工具按鈕。 |
| `QStyle.PE_IndicatorHeaderArrow` | ? | 箭頭用來表示一個列表或表頭的排序。 |
| `QStyle.PE_FrameStatusBarItem` | `PE_FrameStatusBar` | 幀狀態欄的項目;也看到[QStatusBar](qstatusbar.html)。 |
| `QStyle.PE_FrameWindow` | ? | 圍繞一個MDI子窗口或對接窗口框架。 |
| `QStyle.PE_Q3Separator` | `4` | Qt的3兼容通用的分隔符。 |
| `QStyle.PE_IndicatorMenuCheckMark` | ? | 檢查在菜單中使用的標記。 |
| `QStyle.PE_IndicatorProgressChunk` | ? | 一個進度條指示的部分;也看到[QProgressBar](qprogressbar.html)。 |
| `QStyle.PE_Q3CheckListController` | `0` | 在列表項中的Qt 3兼容的控制器部分。 |
| `QStyle.PE_Q3CheckListIndicator` | `2` | 在列表項中的Qt 3兼容復選框一部分。 |
| `QStyle.PE_Q3CheckListExclusiveIndicator` | `1` | 在列表項中的Qt 3兼容的單選按鈕的一部分。 |
| `QStyle.PE_IndicatorBranch` | ? | 線用來表示一個樹視圖樹的分支。 |
| `QStyle.PE_IndicatorToolBarHandle` | ? | 工具欄的句柄。 |
| `QStyle.PE_IndicatorToolBarSeparator` | ? | 在工具欄的分隔符。 |
| `QStyle.PE_PanelToolBar` | ? | 該面板的工具欄。 |
| `QStyle.PE_PanelTipLabel` | ? | 該面板小費標籤。 |
| `QStyle.PE_FrameTabBarBase` | ? | 所繪制的標籤欄,繪制后容易對標籤欄,是不是一個選項卡控件的一部分,該框架。 |
| `QStyle.PE_IndicatorTabTear` | ? | 該標籤有部分在滾動出明顯的標籤欄的時候有很多選項卡的指標。 |
| `QStyle.PE_IndicatorColumnViewArrow` | ? | 在一箭頭[QColumnView](qcolumnview.html)。 |
| `QStyle.PE_Widget` | ? | 一個普通的[QWidget](qwidget.html)。 |
| `QStyle.PE_CustomBase` | `0xf000000` | 自定義基本元素的基礎值。高于此值的所有自定義使用保留。自定義的值必須大于該值。 |
| `QStyle.PE_IndicatorItemViewItemDrop` | ? | 被吸引到那里顯示在項目視圖中的項目大約是在項目視圖中拖動和拖放操作過程中被丟棄的指標。 |
| `QStyle.PE_PanelItemViewItem` | ? | 在項目視圖中的背景為一個項目。 |
| `QStyle.PE_PanelItemViewRow` | ? | 一排中的一個項目視圖的背景。 |
| `QStyle.PE_PanelStatusBar` | ? | 該面板的狀態欄。 |
| `QStyle.PE_IndicatorTabClose` | ? | 在標籤欄的關閉按鈕。 |
| `QStyle.PE_PanelMenu` | ? | 用面板的菜單。 |
**See also** [drawPrimitive](qstyle.html#drawPrimitive)( ) 。
```
QStyle.RequestSoftwareInputPanel
```
在什么情況下一個軟件輸入面板將能夠輸入部件要求該枚舉描述。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.RSIP_OnMouseClickAndAlreadyFocused` | `0` | 請輸入面板,如果用戶點擊窗口小部件,但只有當它已經是重點。 |
| `QStyle.RSIP_OnMouseClick` | `1` | 請輸入面板,如果用戶點擊窗口小部件。 |
**See also** [QEvent.RequestSoftwareInputPanel](qevent.html#Type-enum)和[QInputContext](qinputcontext.html)。
```
QStyle.StandardPixmap
```
這個枚舉變量描述了可用的標準像素圖。一個標準的像素圖是一個可以遵循一些現有的GUI風格或指引一個像素圖。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.SP_TitleBarMinButton` | `1` | 盡量減少對標題欄(例如,在按鈕[QMdiSubWindow](qmdisubwindow.html)) 。 |
| `QStyle.SP_TitleBarMenuButton` | `0` | 在標題欄菜單按鈕。 |
| `QStyle.SP_TitleBarMaxButton` | `2` | 在標題欄最大化按鈕。 |
| `QStyle.SP_TitleBarCloseButton` | `3` | 在標題欄關閉按鈕。 |
| `QStyle.SP_TitleBarNormalButton` | `4` | 普通(恢復)按鈕上的標題欄。 |
| `QStyle.SP_TitleBarShadeButton` | `5` | 在標題欄窗簾按鍵。 |
| `QStyle.SP_TitleBarUnshadeButton` | `6` | 在標題欄取消陰影按鈕。 |
| `QStyle.SP_TitleBarContextHelpButton` | `7` | 在標題欄的上下文幫助按鈕。 |
| `QStyle.SP_MessageBoxInformation` | `9` | “信息”圖標。 |
| `QStyle.SP_MessageBoxWarning` | `10` | 在“警告”圖標。 |
| `QStyle.SP_MessageBoxCritical` | `11` | “關鍵”圖標。 |
| `QStyle.SP_MessageBoxQuestion` | `12` | 在“問題”圖標。 |
| `QStyle.SP_DesktopIcon` | `13` | “桌面”圖標。 |
| `QStyle.SP_TrashIcon` | `14` | 的“垃圾”圖標。 |
| `QStyle.SP_ComputerIcon` | `15` | “我的電腦”圖標。 |
| `QStyle.SP_DriveFDIcon` | `16` | 軟盤圖標。 |
| `QStyle.SP_DriveHDIcon` | `17` | 該硬盤圖標。 |
| `QStyle.SP_DriveCDIcon` | `18` | CD圖標。 |
| `QStyle.SP_DriveDVDIcon` | `19` | DVD圖標。 |
| `QStyle.SP_DriveNetIcon` | `20` | 網絡圖標。 |
| `QStyle.SP_DirHomeIcon` | `55` | 主目錄圖標。 |
| `QStyle.SP_DirOpenIcon` | `21` | 開放目錄圖標。 |
| `QStyle.SP_DirClosedIcon` | `22` | 封閉的目錄圖標。 |
| `QStyle.SP_DirIcon` | `37` | 該目錄圖標。 |
| `QStyle.SP_DirLinkIcon` | `23` | 鏈接目錄圖標。 |
| `QStyle.SP_FileIcon` | `24` | 文件圖標。 |
| `QStyle.SP_FileLinkIcon` | `25` | 鏈接到文件圖標。 |
| `QStyle.SP_FileDialogStart` | `28` | 在文件對話框中的“啟動”圖標。 |
| `QStyle.SP_FileDialogEnd` | `29` | 在文件對話框中的“結束”圖標。 |
| `QStyle.SP_FileDialogToParent` | `30` | 在文件對話框中的“父目錄”圖標。 |
| `QStyle.SP_FileDialogNewFolder` | `31` | 在文件對話框中的“新建文件夾”圖標。 |
| `QStyle.SP_FileDialogDetailedView` | `32` | 在一個文件對話框的詳細視圖圖標。 |
| `QStyle.SP_FileDialogInfoView` | `33` | 在一個文件對話框的文件信息圖標。 |
| `QStyle.SP_FileDialogContentsView` | `34` | 內容在一個文件對話框查看圖標。 |
| `QStyle.SP_FileDialogListView` | `35` | 在文件對話框中的列表視圖圖標。 |
| `QStyle.SP_FileDialogBack` | `36` | 后退箭頭在一個文件對話框。 |
| `QStyle.SP_DockWidgetCloseButton` | `8` | 在停靠窗口關閉按鈕(參見[QDockWidget](qdockwidget.html)) 。 |
| `QStyle.SP_ToolBarHorizontalExtensionButton` | `26` | 擴展按鈕水平的工具欄。 |
| `QStyle.SP_ToolBarVerticalExtensionButton` | `27` | 擴展按鈕垂直工具欄。 |
| `QStyle.SP_DialogOkButton` | `38` | 圖示為一個標準的確定按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogCancelButton` | `39` | 圖示為一個標準的取消按鈕在[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogHelpButton` | `40` | 圖示為一個標準的幫助按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogOpenButton` | `41` | 圖示為一個標準的打開按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogSaveButton` | `42` | 圖示為一個標準的保存按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogCloseButton` | `43` | 圖示為一個標準的關閉按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogApplyButton` | `44` | 圖示為一個標準的應用按鈕在[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogResetButton` | `45` | 圖示為一個標準的Reset按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogDiscardButton` | `46` | 圖示為一個標準的放棄按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogYesButton` | `47` | 圖示為一個標準Yes按鈕[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_DialogNoButton` | `48` | 圖示為一個標準的無按鈕的[QDialogButtonBox](qdialogbuttonbox.html)。 |
| `QStyle.SP_ArrowUp` | `49` | 圖標,箭頭朝上。 |
| `QStyle.SP_ArrowDown` | `50` | 圖示箭頭指向下方。 |
| `QStyle.SP_ArrowLeft` | `51` | 圖示箭頭指向左邊。 |
| `QStyle.SP_ArrowRight` | `52` | 圖示箭頭指向右側。 |
| `QStyle.SP_ArrowBack` | `53` | 相當于SP_ArrowLeft在當前布局的方向是[Qt.LeftToRight](qt.html#LayoutDirection-enum),否則SP_ArrowRight 。 |
| `QStyle.SP_ArrowForward` | `54` | 相當于SP_ArrowRight在當前布局的方向是[Qt.LeftToRight](qt.html#LayoutDirection-enum),否則SP_ArrowLeft 。 |
| `QStyle.SP_CommandLink` | `56` | 圖標用來表示一個Vista的風格命令鏈接字形。 |
| `QStyle.SP_VistaShield` | `57` | 圖標用來表示UAC提示在Windows Vista上。這將返回一個null像素圖或圖標在所有其他平臺上。 |
| `QStyle.SP_BrowserReload` | `58` | 圖標表明當前頁面應該被重新加載。 |
| `QStyle.SP_BrowserStop` | `59` | 圖標,表示頁面載入應停止。 |
| `QStyle.SP_MediaPlay` | `60` | 圖標,表示媒體應該開始播放。 |
| `QStyle.SP_MediaStop` | `61` | 圖標,表示媒體應該停止播放。 |
| `QStyle.SP_MediaPause` | `62` | 圖標,表示媒體應該暫停播放。 |
| `QStyle.SP_MediaSkipForward` | `63` | 圖標,表示媒體應該向前跳。 |
| `QStyle.SP_MediaSkipBackward` | `64` | 圖標,表示媒體應該快退。 |
| `QStyle.SP_MediaSeekForward` | `65` | 圖標,表示媒體應該尋求前進。 |
| `QStyle.SP_MediaSeekBackward` | `66` | 圖標,表示媒體應該尋求落后。 |
| `QStyle.SP_MediaVolume` | `67` | 圖標,表示音量控制。 |
| `QStyle.SP_MediaVolumeMuted` | `68` | 圖標表示靜音音量控制。 |
| `QStyle.SP_CustomBase` | `0xf0000000` | 自定義標準的像素圖的基礎值;自定義值必須大于該值。 |
**See also** [standardIcon](qstyle.html#standardIcon)( ) 。
```
QStyle.StateFlag
```
這個枚舉介紹了繪制基本元素時使用的標志。
請注意,并非所有的原語使用所有這些標志,而該標志可能意味著不同的事情不同的項目。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.State_None` | `0x00000000` | 表示該窗口小部件不具有的狀態。 |
| `QStyle.State_Active` | `0x00010000` | 表示該窗口小部件是活動的。 |
| `QStyle.State_AutoRaise` | `0x00001000` | 用于指示是否自動加薪的外觀應該是一個工具按鈕美元。 |
| `QStyle.State_Children` | `0x00080000` | 用來表示一個項目視圖分支有孩子。 |
| `QStyle.State_DownArrow` | `0x00000040` | 用來表示一個向下的箭頭應該是可見的部件。 |
| `QStyle.State_Editing` | `0x00400000` | 用來表示一個編輯器中打開的窗口小部件。 |
| `QStyle.State_Enabled` | `0x00000001` | 用于指示,如果插件被啟用。 |
| `QStyle.State_HasEditFocus` | `0x01000000` | 用來表示小部件目前有編輯焦點。 |
| `QStyle.State_HasFocus` | `0x00000100` | 用來表示小部件具有焦點。 |
| `QStyle.State_Horizontal` | `0x00000080` | 用來表示小部件的布局水平,例如。一個工具欄。 |
| `QStyle.State_KeyboardFocusChange` | `0x00800000` | 用來表示如果焦點是與鍵盤,如標籤, BACKTAB或快捷方式改變。 |
| `QStyle.State_MouseOver` | `0x00002000` | 用來表示小部件位于鼠標下方。 |
| `QStyle.State_NoChange` | `0x00000010` | 用來表示一個三態復選框。 |
| `QStyle.State_Off` | `0x00000008` | 用來表示如果小部件不進行檢查。 |
| `QStyle.State_On` | `0x00000020` | 用來表示小部件進行檢查。 |
| `QStyle.State_Raised` | `0x00000002` | 用于指示是否提出了一個按鈕。 |
| `QStyle.State_ReadOnly` | `0x02000000` | 用來表示一個widget是只讀的。 |
| `QStyle.State_Selected` | `0x00008000` | 用于指示是否選擇一個小部件。 |
| `QStyle.State_Item` | `0x00100000` | 使用項目的意見表明,如果一個水平分支應該被繪制。 |
| `QStyle.State_Open` | `0x00040000` | 使用項目的意見表明,如果樹枝是開放的。 |
| `QStyle.State_Sibling` | `0x00200000` | 使用項目的意見,表示如果垂直線需要繪制(兄弟姐妹) 。 |
| `QStyle.State_Sunken` | `0x00000004` | 用來表示如果小部件凹陷或壓制。 |
| `QStyle.State_UpArrow` | `0x00004000` | 用于指示是否一個向上的箭頭應該是可見的部件。 |
| `QStyle.State_Mini` | `0x08000000` | 用來表示一個迷你的Mac風格的Widget或按鈕。 |
| `QStyle.State_Small` | `0x04000000` | 用來表示一個小的Mac風格的Widget或按鈕。 |
國家類型是一個typedef為[QFlags](index.htm)\u003cStateFlag\u003e 。它存儲StateFlag值的或組合。
**See also** [drawPrimitive](qstyle.html#drawPrimitive)( ) 。
```
QStyle.StyleHint
```
這個枚舉變量描述了可用的樣式提示。樣式提示是一般的外觀和/或感覺的暗示。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.SH_EtchDisabledText` | `0` | 殘疾人士使用的文字是“蝕刻”,因為它是在Windows上。 |
| `QStyle.SH_DitherDisabledText` | `1` | 禁用文本抖動,因為它是在母題。 |
| `QStyle.SH_GUIStyle` | `0x00000100` | GUI的風格來使用。 |
| `QStyle.SH_ScrollBar_ContextMenu` | ? | 不論滾動條有一個上下文菜單。 |
| `QStyle.SH_ScrollBar_MiddleClickAbsolutePosition` | `2` | 一個布爾值。如果為True ,鼠標中間的滾動條使滑塊跳轉到該位置。如果為False ,鼠標中間被忽略。 |
| `QStyle.SH_ScrollBar_LeftClickAbsolutePosition` | ? | 一個布爾值。如果為True ,左鍵單擊滾動條使滑塊跳轉到該位置。如果為False ,單擊鼠標左鍵將表現為適用于每個控制。 |
| `QStyle.SH_ScrollBar_ScrollWhenPointerLeavesControl` | `3` | 一個布爾值。如果為True ,當單擊滾動條[SubControl](qstyle.html#SubControl-enum),按住鼠標按鈕并移動光標外[SubControl](qstyle.html#SubControl-enum),滾動條繼續滾動。如果為False ,則scollbar停止滾動指針離開時,[SubControl](qstyle.html#SubControl-enum)。 |
| `QStyle.SH_ScrollBar_RollBetweenButtons` | ? | 一個布爾值。如果為True ,則單擊滾動條按鈕時([SC_ScrollBarAddLine](qstyle.html#SubControl-enum) or [SC_ScrollBarSubLine](qstyle.html#SubControl-enum)),并拖過到對面按鈕(軋)會按新的按鈕,然后釋放舊的。當它是假的,原來的按鈕被釋放,沒有任何反應(如按鈕) 。 |
| `QStyle.SH_TabBar_Alignment` | `5` | 在對齊選項卡中[QTabWidget](qtabwidget.html)。可能的值是[Qt.AlignLeft](qt.html#AlignmentFlag-enum),[Qt.AlignCenter](qt.html#AlignmentFlag-enum)和[Qt.AlignRight](qt.html#AlignmentFlag-enum)。 |
| `QStyle.SH_Header_ArrowAlignment` | `6` | 排序指標的位置可能會出現在列表或表頭。可能的值是[Qt.Left](index.htm#Dock-enum) or [Qt.Right](index.htm#Dock-enum)。 |
| `QStyle.SH_Slider_SnapToValue` | `7` | 滑塊捕捉到的值而感動,因為他們做的Windows 。 |
| `QStyle.SH_Slider_SloppyKeyEvents` | `8` | 在一個草率的方式處理按鍵,即留在一個垂直滑塊減去一行。 |
| `QStyle.SH_ProgressDialog_CenterCancelButton` | `9` | 進度對話框,像花片中心按鈕,否則右對齊。 |
| `QStyle.SH_ProgressDialog_TextLabelAlignment` | `10` | 該路線在進程對話框的文本標籤;[Qt.AlignCenter](qt.html#AlignmentFlag-enum)在Windows上,[Qt.AlignVCenter](qt.html#AlignmentFlag-enum)否則。 |
| `QStyle.SH_PrintDialog_RightAlignButtons` | `11` | 右對齊按鈕,在打印對話框中,為已完成在Windows上。 |
| `QStyle.SH_MainWindow_SpaceBelowMenuBar` | `12` | 菜單欄和dockarea之間的一個或兩個像素的空間,在Windows上所做的那樣。 |
| `QStyle.SH_FontDialog_SelectAssociatedText` | `13` | 選擇該行編輯的文本,或者從列表框中選擇一個項目時,或當行編輯接收焦點,為已完成在Windows上。 |
| `QStyle.SH_Menu_KeyboardSearch` | ? | 打字導致菜單是搜索相關的項目,否則只能mnemnonic考慮。 |
| `QStyle.SH_Menu_AllowActiveAndDisabled` | `14` | 允許禁用菜單項被激活。 |
| `QStyle.SH_Menu_SpaceActivatesItem` | `15` | 按下空格鍵激活這個項目,為已完成的母題。 |
| `QStyle.SH_Menu_SubMenuPopupDelay` | `16` | 毫秒數(在Windows 96上的Motif 256 )打開一個子菜單之前的等待時間。 |
| `QStyle.SH_Menu_Scrollable` | ? | 是否彈出菜單必須支持滾動。 |
| `QStyle.SH_Menu_SloppySubMenus` | ? | 無論是彈出式菜單的必須支持馬虎子菜單;為實現在Mac OS 。 |
| `QStyle.SH_ScrollView_FrameOnlyAroundContents` | `17` | 無論scrollviews得出自己幀只左右的內容(如基序) ,或前后內容,滾動條和角落的小部件(如Windows) 。 |
| `QStyle.SH_MenuBar_AltKeyNavigation` | `18` | 菜單欄項目通航按下Alt鍵,然后使用箭頭鍵選擇所需的項目。 |
| `QStyle.SH_ComboBox_ListMouseTracking` | `19` | 鼠標跟蹤組合框的下拉列表。 |
| `QStyle.SH_Menu_MouseTracking` | `20` | 跟蹤鼠標在彈出式菜單。 |
| `QStyle.SH_MenuBar_MouseTracking` | `21` | 跟蹤鼠標在菜單欄。 |
| `QStyle.SH_Menu_FillScreenWithScroll` | ? | 無論是彈出窗口滾動應充滿整個屏幕,因為它們是滾動。 |
| `QStyle.SH_Menu_SelectionWrap` | ? | 無論是彈出窗口應允許選擇換行,即當選擇應的下一個項目是第一個項目。 |
| `QStyle.SH_ItemView_ChangeHighlightOnFocus` | `22` | 灰色失去焦點時出選定的項目。 |
| `QStyle.SH_Widget_ShareActivation` | `23` | 打開浮動模式對話框共享激活。 |
| `QStyle.SH_TabBar_SelectMouseType` | `4` | 鼠標事件的哪種類型應該引起一個標籤被選中。 |
| `QStyle.SH_Q3ListViewExpand_SelectMouseType` | ? | 鼠標事件的哪種類型應該引起一個列表視圖擴展到被選中。 |
| `QStyle.SH_TabBar_PreferNoArrows` | ? | 標籤欄是否應該建議一個大小,以防止scoll箭頭。 |
| `QStyle.SH_ComboBox_Popup` | `25` | 允許彈出窗口作為一個組合框的下拉菜單。 |
| `QStyle.SH_Workspace_FillSpaceOnMaximize` | `24` | 工作區應盡量在客戶區。 |
| `QStyle.SH_TitleBar_NoBorder` | `26` | 標題欄沒有邊框。 |
| `QStyle.SH_ScrollBar_StopMouseOverSlider` | `SH_Slider_StopMouseOverSlider` | 已過時。使用SH_Slider_StopMouseOverSlider代替。 |
| `QStyle.SH_Slider_StopMouseOverSlider` | `27` | 停止自動重復當滑塊到達的鼠標位置。 |
| `QStyle.SH_BlinkCursorWhenTextSelected` | ? | 是否當選擇文本光標會閃爍。 |
| `QStyle.SH_RichText_FullWidthSelection` | ? | 是否富文本的選擇應該擴展到文檔的整個寬度。 |
| `QStyle.SH_GroupBox_TextLabelVerticalAlignment` | ? | 如何垂直對齊一組框的文本標籤。 |
| `QStyle.SH_GroupBox_TextLabelColor` | ? | 怎么畫一個組合框的文本標籤。 |
| `QStyle.SH_DialogButtons_DefaultButton` | ? | 哪個按鈕獲取對話框的按鈕插件的默認狀態。 |
| `QStyle.SH_ToolBox_SelectedPageTitleBold` | ? | 在一個選定的頁面標題氣魄[QToolBox](qtoolbox.html)。 |
| `QStyle.SH_LineEdit_PasswordCharacter` | ? | 要用于密碼的Unicode字符。 |
| `QStyle.SH_Table_GridLineColor` | ? | 網格的一個表中的RGB值。 |
| `QStyle.SH_UnderlineShortcut` | ? | 無論是快捷鍵下劃線。 |
| `QStyle.SH_SpellCheckUnderlineStyle` | ? | A [QTextCharFormat.UnderlineStyle](qtextcharformat.html#UnderlineStyle-enum)值,指定的方式拼寫錯誤的單詞應該強調。 |
| `QStyle.SH_SpinBox_AnimateButton` | ? | 動畫顯示時,單擊向上或向下微調框被按下。 |
| `QStyle.SH_SpinBox_KeyPressAutoRepeatRate` | ? | 自動重復間隔紡紗器按鍵。 |
| `QStyle.SH_SpinBox_ClickAutoRepeatRate` | ? | 自動重復間隔微調框中點擊鼠標。 |
| `QStyle.SH_SpinBox_ClickAutoRepeatThreshold` | ? | 自動重復門檻紡紗鼠標點擊。 |
| `QStyle.SH_ToolTipLabel_Opacity` | ? | 一個整數,指示不透明度的小費標籤, 0是完全透明, 255是完全不透明的。 |
| `QStyle.SH_DrawMenuBarSeparator` | ? | 顯示菜單欄不論是否繪制分隔符。 |
| `QStyle.SH_TitleBar_ModifyNotification` | ? | 表示如果標題欄應該顯示“*”為被修改的窗口。 |
| `QStyle.SH_Button_FocusPolicy` | ? | 默認焦點政策的按鈕。 |
| `QStyle.SH_CustomBase` | `0xf0000000` | 為自定義樣式提示基值。自定義的值必須大于該值。 |
| `QStyle.SH_MenuBar_DismissOnSecondClick` | ? | 一個布爾值,指示是否在菜單欄中的菜單被點擊了第二次時,應予以駁回。 (例:單擊和釋放在一個菜單欄,然后立即在文件菜單上再次單擊文件菜單) |
| `QStyle.SH_MessageBox_UseBorderForButtonSpacing` | ? | 一個布爾值,指示要使用的按鈕的邊框(計算一半的按鈕高度)為按鈕的消息框的間距。 |
| `QStyle.SH_MessageBox_CenterButtons` | ? | 一個布爾值,指示是否在消息框中的按鈕應該居中與否(見QDialogButtonBox.setCentered ( ) ) 。 |
| `QStyle.SH_MessageBox_TextInteractionFlags` | ? | 一個布爾值,指示是否在消息框中的文本應該允許用戶interfactions (如選擇)或沒有。 |
| `QStyle.SH_TitleBar_AutoRaise` | ? | 一個布爾值,指示是否在標題欄的控件應該更新當鼠標移動到它們。 |
| `QStyle.SH_ToolButton_PopupDelay` | ? | 一個int,指示彈出延遲(毫秒)連接到工具按鈕菜單。 |
| `QStyle.SH_FocusFrame_Mask` | ? | 對焦框的面具。 |
| `QStyle.SH_RubberBand_Mask` | ? | 橡皮筋的面具。 |
| `QStyle.SH_WindowFrame_Mask` | ? | 窗框的掩碼。 |
| `QStyle.SH_SpinControls_DisableOnBounds` | ? | 確定是否達到自旋范圍邊界時,旋轉控件將顯示為禁用。 |
| `QStyle.SH_Dial_BackgroundRole` | ? | 定義樣式的首選背景的角色(如[QPalette.ColorRole](qpalette.html#ColorRole-enum))撥號窗口小部件。 |
| `QStyle.SH_ScrollBar_BackgroundMode` | ? | 背景模式的滾動條。 |
| `QStyle.SH_ComboBox_LayoutDirection` | ? | 布局方向為組合框。默認情況下,由所指示它應該是相同的[QStyleOption.direction](qstyleoption.html#direction-var)變量。 |
| `QStyle.SH_ItemView_EllipsisLocation` | ? | 其中橢圓應項文本太長,以適應在一個視圖項目被添加的位置。 |
| `QStyle.SH_ItemView_ShowDecorationSelected` | ? | 當一個項目視圖中的項目被選中,也突出了分公司或其他裝飾。 |
| `QStyle.SH_ItemView_ActivateItemOnSingleClick` | ? | 發出的激活信號,當用戶單點擊在一個項目中的一個項目的項目視圖。否則,信號被發射時,在項目上用戶雙擊。 |
| `QStyle.SH_Slider_AbsoluteSetButtons` | ? | 哪個鼠標按鈕導致滑塊值設置為位置點擊。 |
| `QStyle.SH_Slider_PageSetButtons` | ? | 哪個鼠標按鈕導致滑塊頁面步驟的價值。 |
| `QStyle.SH_TabBar_ElideMode` | ? | 默認風格未提及的一個標籤欄。 |
| `QStyle.SH_DialogButtonLayout` | ? | 控制按鈕是如何在一個布局[QDialogButtonBox](qdialogbuttonbox.html),返回一個[QDialogButtonBox.ButtonLayout](qdialogbuttonbox.html#ButtonLayout-enum)枚舉。 |
| `QStyle.SH_WizardStyle` | ? | 控件的外觀和感覺[QWizard](qwizard.html)。返回[QWizard.WizardStyle](qwizard.html#WizardStyle-enum)枚舉。 |
| `QStyle.SH_FormLayoutWrapPolicy` | ? | 提供了一個默認的行是如何被包裝在一個[QFormLayout](qformlayout.html)。返回[QFormLayout.RowWrapPolicy](qformlayout.html#RowWrapPolicy-enum)枚舉。 |
| `QStyle.SH_FormLayoutFieldGrowthPolicy` | ? | 提供了一個默認的領域如何能在成長[QFormLayout](qformlayout.html)。返回[QFormLayout.FieldGrowthPolicy](qformlayout.html#FieldGrowthPolicy-enum)枚舉。 |
| `QStyle.SH_FormLayoutFormAlignment` | ? | 提供了一個默認的如何[QFormLayout](qformlayout.html)在可用空間內對準其內容。返回[Qt.Alignment](qt.html#AlignmentFlag-enum)枚舉。 |
| `QStyle.SH_FormLayoutLabelAlignment` | ? | 提供了一個默認的如何[QFormLayout](qformlayout.html)對齊的可用空間內的標籤。返回[Qt.Alignment](qt.html#AlignmentFlag-enum)枚舉。 |
| `QStyle.SH_ItemView_ArrowKeysNavigateIntoChildren` | ? | 控制樹視圖是否會選擇第一個孩子時,一份擴充和右箭頭鍵被按下。 |
| `QStyle.SH_ComboBox_PopupFrameStyle` | ? | 繪制一個組合框的彈出菜單時,邊框樣式使用。 |
| `QStyle.SH_DialogButtonBox_ButtonsHaveIcons` | ? | 表示是否StandardButtons在[QDialogButtonBox](qdialogbuttonbox.html)應該有圖標或沒有。 |
| `QStyle.SH_ItemView_MovementWithoutUpdatingSelection` | ? | 項目視圖能夠顯示當前的項目,而不改變選擇。 |
| `QStyle.SH_ToolTip_Mask` | ? | 一個刀尖的面具。 |
| `QStyle.SH_FocusFrame_AboveWidget` | ? | 該FocusFrame堆疊,它是“專注于”小部件上面。 |
| `QStyle.SH_TextControl_FocusIndicatorTextCharFormat` | ? | 指定用于突出顯示富文本文檔集中的錨文本格式顯示,例如[QTextBrowser](qtextbrowser.html)。的格式必須是一個[QTextCharFormat](qtextcharformat.html)中的變體返回[QStyleHintReturnVariant](qstylehintreturnvariant.html)返回值。該[QTextFormat.OutlinePen](qtextformat.html#Property-enum)屬性用于輪廓和[QTextFormat.BackgroundBrush](qtextformat.html#Property-enum)高亮顯示區域的背景。 |
| `QStyle.SH_Menu_FlashTriggeredItem` | ? | 閃光觸發項目。 |
| `QStyle.SH_Menu_FadeOutOnHide` | ? | 褪色,而不是立即躲在它的菜單。 |
| `QStyle.SH_TabWidget_DefaultTabPosition` | ? | 在一個標籤控件標籤欄的默認位置。 |
| `QStyle.SH_ToolBar_Movable` | ? | 確定該工具欄是可移動的默認。 |
| `QStyle.SH_ItemView_PaintAlternatingRowColorsForEmptyArea` | ? | Whether [QTreeView](qtreeview.html) paints alternating row colors for the area that does not have any items. |
| `QStyle.SH_Menu_Mask` | ? | 對于一個彈出菜單的面具。 |
| `QStyle.SH_ItemView_DrawDelegateFrame` | ? | 確定是否應該有一個代表小部件的框架。 |
| `QStyle.SH_TabBar_CloseButtonPosition` | ? | 確定關閉按鈕在標籤欄選項卡上的位置。 |
| `QStyle.SH_DockWidget_ButtonsHaveFrame` | ? | 確定是否dockwidget按鈕應具備的幀。默認值是True 。 |
| `QStyle.SH_ToolButtonStyle` | ? | 確定系統默認的樣式,使用的工具按鈕[Qt.ToolButtonFollowStyle](qt.html#ToolButtonStyle-enum)。 |
| `QStyle.SH_RequestSoftwareInputPanel` | ? | 確定當一個軟件輸入面板應該由輸入部件要求。返回類型的枚舉[QStyle.RequestSoftwareInputPanel](qstyle.html#RequestSoftwareInputPanel-enum)。 |
**See also** [styleHint](qstyle.html#styleHint)( ) 。
```
QStyle.SubControl
```
這個枚舉變量描述了可用的子控件。一個子控件是一個復雜的控制范圍之內的控制元件([ComplexControl](qstyle.html#ComplexControl-enum)) 。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.SC_None` | `0x00000000` | 特殊值相匹配沒有其他的子控件。 |
| `QStyle.SC_ScrollBarAddLine` | `0x00000001` | 滾動條插件線(即,向下/右箭頭) ;也見[QScrollBar](qscrollbar.html)。 |
| `QStyle.SC_ScrollBarSubLine` | `0x00000002` | 滾動條的子行(即,向上/左箭頭) 。 |
| `QStyle.SC_ScrollBarAddPage` | `0x00000004` | 滾動條添加頁面(即,向下翻頁) 。 |
| `QStyle.SC_ScrollBarSubPage` | `0x00000008` | 滾動條的子頁面(即,向上翻頁) 。 |
| `QStyle.SC_ScrollBarFirst` | `0x00000010` | 滾動條第一行(即家庭) 。 |
| `QStyle.SC_ScrollBarLast` | `0x00000020` | 滾動條最后一行(即結束) 。 |
| `QStyle.SC_ScrollBarSlider` | `0x00000040` | 滾動條滑塊手柄。 |
| `QStyle.SC_ScrollBarGroove` | `0x00000080` | 特殊子控制包含在其中滑動手柄可移動區域。 |
| `QStyle.SC_SpinBoxUp` | `0x00000001` | 旋轉小部件上/增加;也見[QSpinBox](qspinbox.html)。 |
| `QStyle.SC_SpinBoxDown` | `0x00000002` | 小部件向下/減小旋轉。 |
| `QStyle.SC_SpinBoxFrame` | `0x00000004` | 旋轉部件框架。 |
| `QStyle.SC_SpinBoxEditField` | `0x00000008` | 旋轉部件編輯字段。 |
| `QStyle.SC_ComboBoxEditField` | `0x00000002` | 組合框編輯字段,還見[QComboBox](qcombobox.html)。 |
| `QStyle.SC_ComboBoxArrow` | `0x00000004` | 組合框的箭頭按鈕。 |
| `QStyle.SC_ComboBoxFrame` | `0x00000001` | 組合框框架。 |
| `QStyle.SC_ComboBoxListBoxPopup` | `0x00000008` | 參照矩形的組合框彈出。用于計算在彈出的位置。 |
| `QStyle.SC_SliderGroove` | `0x00000001` | 特殊子控制包含在其中滑動手柄可移動區域。 |
| `QStyle.SC_SliderHandle` | `0x00000002` | 滑塊手柄。 |
| `QStyle.SC_SliderTickmarks` | `0x00000004` | 滑塊tickmarks 。 |
| `QStyle.SC_ToolButton` | `0x00000001` | 工具按鈕(參見[QToolButton](qtoolbutton.html)) 。 |
| `QStyle.SC_ToolButtonMenu` | `0x00000002` | 子控制的工具按鈕打開一個彈出菜單,還見[Q3PopupMenu](index.htm)。 |
| `QStyle.SC_TitleBarSysMenu` | `0x00000001` | 系統菜單按鈕(即,恢復,關閉等) 。 |
| `QStyle.SC_TitleBarMinButton` | `0x00000002` | 最小化按鈕。 |
| `QStyle.SC_TitleBarMaxButton` | `0x00000004` | 最大化按鈕。 |
| `QStyle.SC_TitleBarCloseButton` | `0x00000008` | 關閉按鈕。 |
| `QStyle.SC_TitleBarLabel` | `0x00000100` | 窗口標題標籤。 |
| `QStyle.SC_TitleBarNormalButton` | `0x00000010` | 普通(恢復)按鈕。 |
| `QStyle.SC_TitleBarShadeButton` | `0x00000020` | 窗簾按鍵。 |
| `QStyle.SC_TitleBarUnshadeButton` | `0x00000040` | 取消陰影按鈕。 |
| `QStyle.SC_TitleBarContextHelpButton` | `0x00000080` | 上下文幫助按鈕。 |
| `QStyle.SC_Q3ListView` | `0x00000001` | 列表視圖區域。 |
| `QStyle.SC_Q3ListViewExpand` | `0x00000004` | 展開項目(即,顯示/隱藏子項) 。 |
| `QStyle.SC_DialHandle` | `0x00000002` | 表盤的手柄(即您使用控制轉盤什么) 。 |
| `QStyle.SC_DialGroove` | `0x00000001` | 槽的撥盤。 |
| `QStyle.SC_DialTickmarks` | `0x00000004` | 該tickmarks為表盤。 |
| `QStyle.SC_GroupBoxFrame` | `0x00000008` | 一組框的邊框。 |
| `QStyle.SC_GroupBoxLabel` | `0x00000002` | 一組框的標題。 |
| `QStyle.SC_GroupBoxCheckBox` | `0x00000001` | 一組框的可選復選框。 |
| `QStyle.SC_GroupBoxContents` | `0x00000004` | 組框的內容。 |
| `QStyle.SC_MdiNormalButton` | `0x00000002` | 一個MDI子窗口菜單欄中的普通按鈕。 |
| `QStyle.SC_MdiMinButton` | `0x00000001` | 在一個MDI子窗口菜單欄中的最小化按鈕。 |
| `QStyle.SC_MdiCloseButton` | `0x00000004` | 一個MDI子窗口菜單欄中的關閉按鈕。 |
| `QStyle.SC_All` | `0xffffffff` | 特殊值相匹配的所有子控件。 |
該子控件的類型是一個typedef為[QFlags](index.htm)\u003cSubControl\u003e 。它存儲子控件的值的OR組合。
**See also** [ComplexControl](qstyle.html#ComplexControl-enum)。
```
QStyle.SubElement
```
該枚舉表示插件的一個子區域。風格實現使用這些區域來繪制控件的不同部分。
| Constant | Value | Description |
| --- | --- | --- |
| `QStyle.SE_PushButtonContents` | `0` | 區域包含標籤(用文字或像素圖標) 。 |
| `QStyle.SE_PushButtonFocusRect` | `1` | 為焦點矩形區域(通常比內容大矩形) 。 |
| `QStyle.SE_PushButtonLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_CheckBoxIndicator` | `2` | 為狀態指示區域(例如,查馬克) 。 |
| `QStyle.SE_CheckBoxContents` | `3` | 為標籤(文本或像素)的區域。 |
| `QStyle.SE_CheckBoxFocusRect` | `4` | 區域對焦指示。 |
| `QStyle.SE_CheckBoxClickRect` | `5` | 可點擊區域,默認為SE_CheckBoxFocusRect 。 |
| `QStyle.SE_CheckBoxLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_DateTimeEditLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_RadioButtonIndicator` | `6` | 面積為狀態指示燈。 |
| `QStyle.SE_RadioButtonContents` | `7` | 區域標籤。 |
| `QStyle.SE_RadioButtonFocusRect` | `8` | 區域對焦指示。 |
| `QStyle.SE_RadioButtonClickRect` | `9` | 可點擊區域,默認為SE_RadioButtonFocusRect 。 |
| `QStyle.SE_RadioButtonLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_ComboBoxFocusRect` | `10` | 區域對焦指示。 |
| `QStyle.SE_SliderFocusRect` | `11` | 區域對焦指示。 |
| `QStyle.SE_SliderLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_SpinBoxLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_Q3DockWindowHandleRect` | `12` | 區域撕紙手柄。 |
| `QStyle.SE_ProgressBarGroove` | `13` | 區域的槽。 |
| `QStyle.SE_ProgressBarContents` | `14` | 區的進度指示器。 |
| `QStyle.SE_ProgressBarLabel` | `15` | 區域的文本標籤。 |
| `QStyle.SE_ProgressBarLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_FrameContents` | ? | 面積為框架的內容。 |
| `QStyle.SE_ShapedFrameContents` | ? | 使用形狀在一個框架的內容區[QStyleOptionFrameV3](qstyleoptionframev3.html)見[QFrame](qframe.html) |
| `QStyle.SE_FrameLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_HeaderArrow` | `27` | 為排序指標頁眉區域。 |
| `QStyle.SE_HeaderLabel` | `26` | 在一個頭的標籤區域。 |
| `QStyle.SE_LabelLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_LineEditContents` | ? | 面積為行編輯的內容。 |
| `QStyle.SE_TabWidgetLeftCorner` | `31` | 在一個選項卡控件的左上角小工具區域。 |
| `QStyle.SE_TabWidgetRightCorner` | `32` | 在一個標籤控件右上角小工具區域。 |
| `QStyle.SE_TabWidgetTabBar` | `28` | 在標籤欄小工具在選項卡控件區域。 |
| `QStyle.SE_TabWidgetTabContents` | `30` | 為選項卡控件的內容區域。 |
| `QStyle.SE_TabWidgetTabPane` | `29` | 一個標籤控件的窗格區域。 |
| `QStyle.SE_TabWidgetLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_ToolBoxTabContents` | `25` | 一個工具箱選項卡的圖標和標籤區域。 |
| `QStyle.SE_ToolButtonLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_ItemViewItemCheckIndicator` | `SE_ViewItemCheckIndicator` | 一個視圖項的選中標記的區域。 |
| `QStyle.SE_TabBarTearIndicator` | ? | 為與滾動箭頭標籤欄的眼淚指標區。 |
| `QStyle.SE_TreeViewDisclosureItem` | ? | 在樹枝的實際披露項目區。 |
| `QStyle.SE_DialogButtonBoxLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_GroupBoxLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_CustomBase` | `0xf0000000` | 自定義子元素的基礎值。自定義的值必須大于該值。 |
| `QStyle.SE_DockWidgetFloatButton` | ? | 碼頭Widget的浮動按鈕。 |
| `QStyle.SE_DockWidgetTitleBarText` | ? | 文字邊界的停靠小部件標題。 |
| `QStyle.SE_DockWidgetCloseButton` | ? | 碼頭Widget的關閉按鈕。 |
| `QStyle.SE_DockWidgetIcon` | ? | 碼頭Widget的圖標。 |
| `QStyle.SE_ComboBoxLayoutItem` | ? | 面積,計數父布局。 |
| `QStyle.SE_ItemViewItemDecoration` | ? | 一個視圖項目的裝飾(圖標)區。 |
| `QStyle.SE_ItemViewItemText` | ? | 面積為視圖項的文本。 |
| `QStyle.SE_ItemViewItemFocusRect` | ? | 一個視圖項目的焦點矩形區域。 |
| `QStyle.SE_TabBarTabLeftButton` | ? | 就在標籤欄標籤的左側有一個小工具區域。 |
| `QStyle.SE_TabBarTabRightButton` | ? | 對于右側的標籤欄標籤的小工具區域。 |
| `QStyle.SE_TabBarTabText` | ? | 在標籤欄選項卡上的文本區域。 |
| `QStyle.SE_ToolBarHandle` | ? | 對于工具欄的手柄區域。 |
**See also** [subElementRect](qstyle.html#subElementRect)( ) 。
* * *
## Method Documentation
```
QStyle.__init__ (self)
```
構造一個樣式對象。
```
QRect QStyle.alignedRect (Qt.LayoutDirection?direction, Qt.Alignment?alignment, QSize?size, QRect?rectangle)
```
[
返回指定的一個新的矩形_size_這是相一致的定_rectangle_根據指定的_alignment_和_direction_。
```
int QStyle.combinedLayoutSpacing (self, QSizePolicy.ControlTypes?controls1, QSizePolicy.ControlTypes?controls2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)
```
返回應之間使用間隔_controls1_和_controls2_在一個布局。_orientation_指定控制是否進行布局并排或垂直堆疊。該_option_參數可用于傳遞有關的父窗口部件的額外信息。該_widget_參數是可選的,也可以使用如_option_為0。
](qrect.html)
[_controls1_和_controls2_是零個或多個或組合](qrect.html)[control types](qsizepolicy.html#ControlType-enum)。
這個函數被調用布局系統。它僅用于[PM_LayoutHorizontalSpacing](qstyle.html#PixelMetric-enum) or [PM_LayoutVerticalSpacing](qstyle.html#PixelMetric-enum)返回一個負值。
此功能被引入Qt的4.3 。
**See also** [layoutSpacing](qstyle.html#layoutSpacing)()和[layoutSpacingImplementation](qstyle.html#layoutSpacingImplementation)( ) 。
```
QStyle.drawComplexControl (self, ComplexControl?cc, QStyleOptionComplex?opt, QPainter?p, QWidget?widget?=?None)
```
這種方法是抽象的,應在任何子類中重新實現。
繪制給定的_control_使用所提供的_painter_由指定的樣式選項_option_。
該_widget_參數是可選的,可以作為援助繪制控件。
該_option_參數是一個指向[QStyleOptionComplex](qstyleoptioncomplex.html)可以使用強制轉換為正確的子類對象的[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。注意,這個`rect`指定的成員_option_必須是邏輯坐標。此函數的重新實現應該使用[visualRect](qstyle.html#visualRect)( )調用之前改變邏輯坐標到屏幕坐標[drawPrimitive](qstyle.html#drawPrimitive)()或[drawControl](qstyle.html#drawControl)()函數。
下表是列出復雜的控制元件及其相關樣式選項的子類。在樣式選項包含所有繪制控件所需的參數,包括[QStyleOption.state](qstyleoption.html#state-var)其持有的[style flags](qstyle.html#StateFlag-enum)被繪制時使用。該表還描述了標志,是鑄造給定的設定時,_option_到適當的子類。
| Complex Control | [QStyleOptionComplex](qstyleoptioncomplex.html) Subclass | Style Flag | Remark |
| --- | --- | --- | --- |
| [CC_SpinBox](qstyle.html#ComplexControl-enum) | [QStyleOptionSpinBox](qstyleoptionspinbox.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the spin box is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the spin box has input focus. |
| [CC_ComboBox](qstyle.html#ComplexControl-enum) | [QStyleOptionComboBox](qstyleoptioncombobox.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the combobox is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the combobox has input focus. |
| [CC_ScrollBar](qstyle.html#ComplexControl-enum) | [QStyleOptionSlider](qstyleoptionslider.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the scroll bar is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the scroll bar has input focus. |
| [CC_Slider](qstyle.html#ComplexControl-enum) | [QStyleOptionSlider](qstyleoptionslider.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the slider is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the slider has input focus. |
| [CC_Dial](qstyle.html#ComplexControl-enum) | [QStyleOptionSlider](qstyleoptionslider.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the dial is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the dial has input focus. |
| [CC_ToolButton](qstyle.html#ComplexControl-enum) | [QStyleOptionToolButton](qstyleoptiontoolbutton.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the tool button is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the tool button has input focus. |
| [State_DownArrow](qstyle.html#StateFlag-enum) | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). |
| [State_On](qstyle.html#StateFlag-enum) | Set if the tool button is a toggle button and is toggled on. |
| [State_AutoRaise](qstyle.html#StateFlag-enum) | Set if the tool button has auto-raise enabled. |
| [State_Raised](qstyle.html#StateFlag-enum) | Set if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled. |
| [CC_TitleBar](qstyle.html#ComplexControl-enum) | [QStyleOptionTitleBar](qstyleoptiontitlebar.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the title bar is enabled. |
| [CC_Q3ListView](qstyle.html#ComplexControl-enum) | [QStyleOptionQ3ListView](index.htm) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the list view is enabled. |
**See also** [drawPrimitive](qstyle.html#drawPrimitive)()和[drawControl](qstyle.html#drawControl)( ) 。
```
QStyle.drawControl (self, ControlElement?element, QStyleOption?opt, QPainter?p, QWidget?widget?=?None)
```
這種方法是抽象的,應在任何子類中重新實現。
繪制給定的_element_用所提供的_painter_由指定的樣式選項_option_。
該_widget_參數是可選的,可以作為援助繪制控件。該_option_參數是一個指向[QStyleOption](qstyleoption.html)可以使用強制轉換為正確的子類對象的[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。
下表列出被控制元件及其相關樣式選項的子類。在樣式選項包含所有繪制控件所需的參數,包括[QStyleOption.state](qstyleoption.html#state-var)它認為,繪制時所使用的風格標志。該表還描述了被投給定的選項,以適當的子類時設置的標志。
需要注意的是,如果一個控制元件沒有列在這里,這是因為它使用的是普通[QStyleOption](qstyleoption.html)對象。
| Control Element | [QStyleOption](qstyleoption.html) Subclass | Style Flag | Remark |
| --- | --- | --- | --- |
| [CE_MenuItem](qstyle.html#ControlElement-enum), [CE_MenuBarItem](qstyle.html#ControlElement-enum) | [QStyleOptionMenuItem](qstyleoptionmenuitem.html) | [State_Selected](qstyle.html#StateFlag-enum) | The menu item is currently selected item. |
| [State_Enabled](qstyle.html#StateFlag-enum) | The item is enabled. |
| [State_DownArrow](qstyle.html#StateFlag-enum) | Indicates that a scroll down arrow should be drawn. |
| [State_UpArrow](qstyle.html#StateFlag-enum) | Indicates that a scroll up arrow should be drawn |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the menu bar has input focus. |
| [CE_PushButton](qstyle.html#ControlElement-enum), [CE_PushButtonBevel](qstyle.html#ControlElement-enum), [CE_PushButtonLabel](qstyle.html#ControlElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the button is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the button has input focus. |
| [State_Raised](qstyle.html#StateFlag-enum) | Set if the button is not down, not on and not flat. |
| [State_On](qstyle.html#StateFlag-enum) | Set if the button is a toggle button and is toggled on. |
| [State_Sunken](qstyle.html#StateFlag-enum) | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). |
| [CE_RadioButton](qstyle.html#ControlElement-enum), [CE_RadioButtonLabel](qstyle.html#ControlElement-enum), [CE_CheckBox](qstyle.html#ControlElement-enum), [CE_CheckBoxLabel](qstyle.html#ControlElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the button is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the button has input focus. |
| [State_On](qstyle.html#StateFlag-enum) | Set if the button is checked. |
| [State_Off](qstyle.html#StateFlag-enum) | Set if the button is not checked. |
| [State_NoChange](qstyle.html#StateFlag-enum) | Set if the button is in the NoChange state. |
| [State_Sunken](qstyle.html#StateFlag-enum) | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). |
| [CE_ProgressBarContents](qstyle.html#ControlElement-enum), [CE_ProgressBarLabel](qstyle.html#ControlElement-enum), [CE_ProgressBarGroove](qstyle.html#ControlElement-enum) | [QStyleOptionProgressBar](qstyleoptionprogressbar.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the progress bar is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the progress bar has input focus. |
| [CE_Header](qstyle.html#ControlElement-enum), [CE_HeaderSection](qstyle.html#ControlElement-enum), [CE_HeaderLabel](qstyle.html#ControlElement-enum) | [QStyleOptionHeader](qstyleoptionheader.html) | | |
| [CE_TabBarTab](qstyle.html#ControlElement-enum), [CE_TabBarTabShape](qstyle.html#ControlElement-enum), [CE_TabBarTabLabel](qstyle.html#ControlElement-enum) | [QStyleOptionTab](qstyleoptiontab.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the tab bar is enabled. |
| [State_Selected](qstyle.html#StateFlag-enum) | The tab bar is the currently selected tab bar. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the tab bar tab has input focus. |
| [CE_ToolButtonLabel](qstyle.html#ControlElement-enum) | [QStyleOptionToolButton](qstyleoptiontoolbutton.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the tool button is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the tool button has input focus. |
| [State_Sunken](qstyle.html#StateFlag-enum) | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). |
| [State_On](qstyle.html#StateFlag-enum) | Set if the tool button is a toggle button and is toggled on. |
| [State_AutoRaise](qstyle.html#StateFlag-enum) | Set if the tool button has auto-raise enabled. |
| [State_MouseOver](qstyle.html#StateFlag-enum) | Set if the mouse pointer is over the tool button. |
| [State_Raised](qstyle.html#StateFlag-enum) | Set if the button is not down and is not on. |
| [CE_ToolBoxTab](qstyle.html#ControlElement-enum) | [QStyleOptionToolBox](qstyleoptiontoolbox.html) | [State_Selected](qstyle.html#StateFlag-enum) | The tab is the currently selected tab. |
| [CE_HeaderSection](qstyle.html#ControlElement-enum) | [QStyleOptionHeader](qstyleoptionheader.html) | [State_Sunken](qstyle.html#StateFlag-enum) | Indicates that the section is pressed. |
| [State_UpArrow](qstyle.html#StateFlag-enum) | Indicates that the sort indicator should be pointing up. |
| [State_DownArrow](qstyle.html#StateFlag-enum) | Indicates that the sort indicator should be pointing down. |
**See also** [drawPrimitive](qstyle.html#drawPrimitive)()和[drawComplexControl](qstyle.html#drawComplexControl)( ) 。
```
QStyle.drawItemPixmap (self, QPainter?painter, QRect?rect, int?alignment, QPixmap?pixmap)
```
繪制給定的_pixmap_在指定的_rectangle_,根據指定的_alignment_,使用所提供的_painter_。
**See also** [drawItemText](qstyle.html#drawItemText)( ) 。
```
QStyle.drawItemText (self, QPainter?painter, QRect?rectangle, int?alignment, QPalette?palette, bool?enabled, QString?text, QPalette.ColorRole?textRole?=?QPalette.NoRole)
```
繪制給定的_text_在指定的_rectangle_使用所提供的_painter_和_palette_。
根據指定的使用畫家的畫筆繪制文本,并對齊和包裹_alignment_。如果明確_textRole_被指定的,文字是用畫的_palette_的顏色在給定的角色。該_enabled_參數指示是否該項目已啟用,重新實現此功能時,該_enabled_參數應該如何影響該項目的結論。
**See also** [Qt.Alignment](qt.html#AlignmentFlag-enum)和[drawItemPixmap](qstyle.html#drawItemPixmap)( ) 。
```
QStyle.drawPrimitive (self, PrimitiveElement?pe, QStyleOption?opt, QPainter?p, QWidget?widget?=?None)
```
這種方法是抽象的,應在任何子類中重新實現。
繪制給定的原始_element_用所提供的_painter_通過使用指定的樣式選項_option_。
該_widget_參數是可選的,可能包含在繪圖的基本元素可以幫助一個小部件。
如下表列出的基本元素及其相關樣式選項的子類。在樣式選項包含所有繪制的元素所需的參數,包括[QStyleOption.state](qstyleoption.html#state-var)它認為,繪制時所使用的風格標志。該表還描述了被投給定的選項,以適當的子類時設置的標志。
需要注意的是,如果一個原始的元素不在此列,這是因為它采用了純[QStyleOption](qstyleoption.html)對象。
| Primitive Element | [QStyleOption](qstyleoption.html) Subclass | Style Flag | Remark |
| --- | --- | --- | --- |
| [PE_FrameFocusRect](qstyle.html#PrimitiveElement-enum) | [QStyleOptionFocusRect](qstyleoptionfocusrect.html) | [State_FocusAtBorder](qstyle.html#StateFlag-enum) | Whether the focus is is at the border or inside the widget. |
| [PE_IndicatorCheckBox](qstyle.html#PrimitiveElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) | [State_NoChange](qstyle.html#StateFlag-enum) | Indicates a "tri-state" checkbox. |
| [State_On](qstyle.html#StateFlag-enum) | Indicates the indicator is checked. |
| [PE_IndicatorRadioButton](qstyle.html#PrimitiveElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) | [State_On](qstyle.html#StateFlag-enum) | Indicates that a radio button is selected. |
| [PE_Q3CheckListExclusiveIndicator](qstyle.html#PrimitiveElement-enum), [PE_Q3CheckListIndicator](qstyle.html#PrimitiveElement-enum) | [QStyleOptionQ3ListView](index.htm) | [State_On](qstyle.html#StateFlag-enum) | Indicates whether or not the controller is selected. |
| [State_NoChange](qstyle.html#StateFlag-enum) | Indicates a "tri-state" controller. |
| [State_Enabled](qstyle.html#StateFlag-enum) | Indicates the controller is enabled. |
| [PE_IndicatorBranch](qstyle.html#PrimitiveElement-enum) | [QStyleOption](qstyleoption.html) | [State_Children](qstyle.html#StateFlag-enum) | Indicates that the control for expanding the tree to show child items, should be drawn. |
| [State_Item](qstyle.html#StateFlag-enum) | Indicates that a horizontal branch (to show a child item), should be drawn. |
| [State_Open](qstyle.html#StateFlag-enum) | Indicates that the tree branch is expanded. |
| [State_Sibling](qstyle.html#StateFlag-enum) | Indicates that a vertical line (to show a sibling item), should be drawn. |
| [PE_IndicatorHeaderArrow](qstyle.html#PrimitiveElement-enum) | [QStyleOptionHeader](qstyleoptionheader.html) | [State_UpArrow](qstyle.html#StateFlag-enum) | Indicates that the arrow should be drawn up; otherwise it should be down. |
| [PE_FrameGroupBox](qstyle.html#PrimitiveElement-enum), [PE_Frame](qstyle.html#PrimitiveElement-enum), [PE_FrameLineEdit](qstyle.html#PrimitiveElement-enum), [PE_FrameMenu](qstyle.html#PrimitiveElement-enum), [PE_FrameDockWidget](qstyle.html#PrimitiveElement-enum), [PE_FrameWindow](qstyle.html#PrimitiveElement-enum) | [QStyleOptionFrame](qstyleoptionframe.html) | [State_Sunken](qstyle.html#StateFlag-enum) | Indicates that the Frame should be sunken. |
| [PE_IndicatorToolBarHandle](qstyle.html#PrimitiveElement-enum) | [QStyleOption](qstyleoption.html) | [State_Horizontal](qstyle.html#StateFlag-enum) | Indicates that the window handle is horizontal instead of vertical. |
| [PE_Q3DockWindowSeparator](qstyle.html#PrimitiveElement-enum) | [QStyleOption](qstyleoption.html) | [State_Horizontal](qstyle.html#StateFlag-enum) | Indicates that the separator is horizontal instead of vertical. |
| [PE_IndicatorSpinPlus](qstyle.html#PrimitiveElement-enum), [PE_IndicatorSpinMinus](qstyle.html#PrimitiveElement-enum), [PE_IndicatorSpinUp](qstyle.html#PrimitiveElement-enum), [PE_IndicatorSpinDown](qstyle.html#PrimitiveElement-enum), | [QStyleOptionSpinBox](qstyleoptionspinbox.html) | [State_Sunken](qstyle.html#StateFlag-enum) | Indicates that the button is pressed. |
| [PE_PanelButtonCommand](qstyle.html#PrimitiveElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) | [State_Enabled](qstyle.html#StateFlag-enum) | Set if the button is enabled. |
| [State_HasFocus](qstyle.html#StateFlag-enum) | Set if the button has input focus. |
| [State_Raised](qstyle.html#StateFlag-enum) | Set if the button is not down, not on and not flat. |
| [State_On](qstyle.html#StateFlag-enum) | Set if the button is a toggle button and is toggled on. |
| [State_Sunken](qstyle.html#StateFlag-enum) | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). |
**See also** [drawComplexControl](qstyle.html#drawComplexControl)()和[drawControl](qstyle.html#drawControl)( ) 。
```
QPixmap QStyle.generatedIconPixmap (self, QIcon.Mode?iconMode, QPixmap?pixmap, QStyleOption?opt)
```
[
這種方法是抽象的,應在任何子類中重新實現。
返回給定的一個副本_pixmap_,風格以符合規定_iconMode_并考慮到所指定的調色板_option_。
該_option_參數可以傳遞額外的信息,但它必須包含一個調色板。
請注意,并非所有的像素圖將符合,在這種情況下返回的像素圖是一個普通的副本。
](qpixmap.html)
[**See also**](qpixmap.html) [QIcon](qicon.html)。
```
SubControl QStyle.hitTestComplexControl (self, ComplexControl?cc, QStyleOptionComplex?opt, QPoint?pt, QWidget?widget?=?None)
```
[
這種方法是抽象的,應在任何子類中重新實現。
返回子控制在給定的_position_在給定的復_control_(由指定的樣式選項_option_) 。
注意,這個_position_表現在屏幕坐標。
](qstyle.html#SubControl-enum)
[該_option_參數是一個指針,指向一個](qstyle.html#SubControl-enum)[QStyleOptionComplex](qstyleoptioncomplex.html)對象(或它的子類) 。該對象可以使用強制轉換為適當的類型[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。看[drawComplexControl](qstyle.html#drawComplexControl)( )了解詳情。該_widget_參數是可選的,并且可以包含其他信息的功能。
**See also** [drawComplexControl](qstyle.html#drawComplexControl)()和[subControlRect](qstyle.html#subControlRect)( ) 。
```
QRect QStyle.itemPixmapRect (self, QRect?r, int?flags, QPixmap?pixmap)
```
[
于給定的返回區_rectangle_在其中繪制指定_pixmap_根據所定義的_alignment_。
](qrect.html)
```
QRect QStyle.itemTextRect (self, QFontMetrics?fm, QRect?r, int?flags, bool?enabled, QString?text)
```
[
于給定的返回區_rectangle_在其中繪制的提供_text_根據指定的字體_metrics_和_alignment_。該_enabled_參數表示是否將相關項目已啟用。
](qrect.html)
[如果給定的_rectangle_比來呈現所需要的面積大的_text_,返回的矩形將中的偏移量_rectangle_根據指定的_alignment_。例如,如果_alignment_ is](qrect.html) [Qt.AlignCenter](qt.html#AlignmentFlag-enum),返回的矩形將內居中_rectangle_。如果給定的_rectangle_比所需要的面積小,則返回的矩形將是最小的矩形大到足以使該_text_。
**See also** [Qt.Alignment](qt.html#AlignmentFlag-enum)。
```
int QStyle.layoutSpacing (self, QSizePolicy.ControlType?control1, QSizePolicy.ControlType?control2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)
```
返回應之間使用間隔_control1_和_control2_在一個布局。_orientation_指定控制是否進行布局并排或垂直堆疊。該_option_參數可用于傳遞有關的父窗口部件的額外信息。該_widget_參數是可選的,也可以使用如_option_為0。
這個函數被調用布局系統。它僅用于[PM_LayoutHorizontalSpacing](qstyle.html#PixelMetric-enum) or [PM_LayoutVerticalSpacing](qstyle.html#PixelMetric-enum)返回一個負值。
對于二進制兼容性的原因,這個功能是不是虛擬的。如果你想在一個指定自定義布局間距[QStyle](qstyle.html)子類,實現了一個名為槽[layoutSpacingImplementation](qstyle.html#layoutSpacingImplementation)( ) 。[QStyle](qstyle.html)會發現槽在運行時(使用Qt的[meta-object system](index.htm#meta-object-system))和直接所有調用layoutSpacing ()來[layoutSpacingImplementation](qstyle.html#layoutSpacingImplementation)( ) 。
此功能被引入Qt的4.3 。
**See also** [combinedLayoutSpacing](qstyle.html#combinedLayoutSpacing)()和[layoutSpacingImplementation](qstyle.html#layoutSpacingImplementation)( ) 。
```
int QStyle.layoutSpacingImplementation (self, QSizePolicy.ControlType?control1, QSizePolicy.ControlType?control2, Qt.Orientation?orientation, QStyleOption?option?=?None, QWidget?widget?=?None)
```
這種方法也是一個Qt槽與C + +的簽名`int layoutSpacingImplementation(QSizePolicy::ControlType,QSizePolicy::ControlType,Qt::Orientation,const QStyleOption * = 0,const QWidget * = 0) const`。
這個槽被調用者[layoutSpacing](qstyle.html#layoutSpacing)()來確定應該之間使用間隔_control1_和_control2_在一個布局。_orientation_指定控制是否進行布局并排或垂直堆疊。該_option_參數可用于傳遞有關的父窗口部件的額外信息。該_widget_參數是可選的,也可以使用如_option_為0。
如果您想提供自定義布局間距的[QStyle](qstyle.html)子類,在子類實現一個名為layoutSpacingImplementation插槽( ) 。請注意,此插槽將僅在被調用[PM_LayoutHorizontalSpacing](qstyle.html#PixelMetric-enum) or [PM_LayoutVerticalSpacing](qstyle.html#PixelMetric-enum)返回一個負值。
默認實現返回-1 。
此功能被引入Qt的4.3 。
**See also** [layoutSpacing](qstyle.html#layoutSpacing)()和[combinedLayoutSpacing](qstyle.html#combinedLayoutSpacing)( ) 。
```
int QStyle.pixelMetric (self, PixelMetric?metric, QStyleOption?option?=?None, QWidget?widget?=?None)
```
這種方法是抽象的,應在任何子類中重新實現。
返回給定像素的值_metric_。
指定_option_和_widget_可用于計算所述度量。在一般情況下,_widget_參數不使用。該_option_可以使用強制轉換為適當的類型[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。注意,這個_option_可能為零甚至為PixelMetrics ,可以使的它的使用。請參閱下表為適當_option_施放:
| Pixel Metric | [QStyleOption](qstyleoption.html) Subclass |
| --- | --- |
| [PM_SliderControlThickness](qstyle.html#PixelMetric-enum) | [QStyleOptionSlider](qstyleoptionslider.html) |
| [PM_SliderLength](qstyle.html#PixelMetric-enum) | [QStyleOptionSlider](qstyleoptionslider.html) |
| [PM_SliderTickmarkOffset](qstyle.html#PixelMetric-enum) | [QStyleOptionSlider](qstyleoptionslider.html) |
| [PM_SliderSpaceAvailable](qstyle.html#PixelMetric-enum) | [QStyleOptionSlider](qstyleoptionslider.html) |
| [PM_ScrollBarExtent](qstyle.html#PixelMetric-enum) | [QStyleOptionSlider](qstyleoptionslider.html) |
| [PM_TabBarTabOverlap](qstyle.html#PixelMetric-enum) | [QStyleOptionTab](qstyleoptiontab.html) |
| [PM_TabBarTabHSpace](qstyle.html#PixelMetric-enum) | [QStyleOptionTab](qstyleoptiontab.html) |
| [PM_TabBarTabVSpace](qstyle.html#PixelMetric-enum) | [QStyleOptionTab](qstyleoptiontab.html) |
| [PM_TabBarBaseHeight](qstyle.html#PixelMetric-enum) | [QStyleOptionTab](qstyleoptiontab.html) |
| [PM_TabBarBaseOverlap](qstyle.html#PixelMetric-enum) | [QStyleOptionTab](qstyleoptiontab.html) |
一些像素指標正在從所謂的小部件和一些僅由風格內部調用。如果度量標準不調用一個小部件,它的風格作者的自由裁量權,使的它的使用。對于一些樣式,這可能并不合適。
```
QStyle.polish (self, QWidget)
```
初始化給定的外觀_widget_。
這個函數被調用的每個部件在某些時候它已經完全建立之后,但只是_before_它顯示的是第一次。
請注意,默認實現不執行任何操作。在這個函數中合理的行動可能是調用[QWidget.setBackgroundMode](index.htm#setBackgroundMode)()函數的窗口小部件。不使用函數來設置,例如,在幾何形狀。重新實現此功能提供了一個后門,通過該窗口小部件的外觀是可以改變的,但Qt的樣式引擎,它很少是必要來實現這個功能,重新實現[drawItemPixmap](qstyle.html#drawItemPixmap)( )[drawItemText](qstyle.html#drawItemText)( )[drawPrimitive](qstyle.html#drawPrimitive)()等來代替。
該[QWidget.inherits](qobject.html#inherits)( )函數可以提供足夠的信息,使類特定的自定義設置。但由于新[QStyle](qstyle.html)子類都必須給予所有當前和合理的工作_future_小部件,有限使用硬編碼的定制建議。
**See also** [unpolish](qstyle.html#unpolish)( ) 。
```
QStyle.polish (self, QApplication)
```
這是一個重載函數。
給定的晚初始化_application_對象。
```
QPalette QStyle.polish (self, QPalette)
```
[
這是一個重載函數。
更改_palette_根據樣式調色板的具體要求(如果有的話) 。
](qpalette.html)
[**See also**](qpalette.html) [QPalette](qpalette.html)和[QApplication.setPalette](qapplication.html#setPalette)( ) 。
```
QStyle QStyle.proxy (self)
```
[
該函數返回這種風格目前代理。默認情況下,大多數款式將返回自己。然而,當一個代理樣式是在使用中,它將使風格回調到其代理。
此功能被引入Qt的4.6 。
](qstyle.html)
```
QSize QStyle.sizeFromContents (self, ContentsType?ct, QStyleOption?opt, QSize?contentsSize, QWidget?widget?=?None)
```
[
這種方法是抽象的,應在任何子類中重新實現。
返回由指定所描述的元件的尺寸_option_和_type_的基礎上,提供_contentsSize_。
](qsize.html)
[該_option_參數是一個指針,指向一個](qsize.html)[QStyleOption](qstyleoption.html)或其子類之一。該_option_可以使用強制轉換為適當的類型[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。該_widget_是一個可選的參數,并且可以包含用于計算大小的額外信息。
請參閱下表為適當_option_施放:
| Contents Type | [QStyleOption](qstyleoption.html) Subclass |
| --- | --- |
| [CT_PushButton](qstyle.html#ContentsType-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [CT_CheckBox](qstyle.html#ContentsType-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [CT_RadioButton](qstyle.html#ContentsType-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [CT_ToolButton](qstyle.html#ContentsType-enum) | [QStyleOptionToolButton](qstyleoptiontoolbutton.html) |
| [CT_ComboBox](qstyle.html#ContentsType-enum) | [QStyleOptionComboBox](qstyleoptioncombobox.html) |
| [CT_Splitter](qstyle.html#ContentsType-enum) | [QStyleOption](qstyleoption.html) |
| [CT_Q3DockWindow](qstyle.html#ContentsType-enum) | [QStyleOptionQ3DockWindow](index.htm) |
| [CT_ProgressBar](qstyle.html#ContentsType-enum) | [QStyleOptionProgressBar](qstyleoptionprogressbar.html) |
| [CT_MenuItem](qstyle.html#ContentsType-enum) | [QStyleOptionMenuItem](qstyleoptionmenuitem.html) |
**See also** [ContentsType](qstyle.html#ContentsType-enum)和[QStyleOption](qstyleoption.html)。
```
int QStyle.sliderPositionFromValue (int?min, int?max, int?logicalValue, int?span, bool?upsideDown?=?False)
```
轉換給定的_logicalValue_到的像素位置。該_min_參數映射到0 ,_max_映射到_span_和其他值都均勻地分布在兩者之間。
此功能可以處理整個整數范圍內無溢出,前提是_span_小于4096 。
默認情況下,這個函數假設的最大值是上水平的項目的權利,并在底部垂直項目。設置_upsideDown_參數設置為True來扭轉這種行為。
**See also** [sliderValueFromPosition](qstyle.html#sliderValueFromPosition)( ) 。
```
int QStyle.sliderValueFromPosition (int?min, int?max, int?position, int?span, bool?upsideDown?=?False)
```
在給定的像素變換_position_到一個邏輯值。 0映射到_min_參數,_span_映射到_max_和其他值都均勻地分布在兩者之間。
此功能可以處理整個整數范圍內無溢出。
默認情況下,這個函數假設的最大值是上水平的項目的權利,并在底部垂直項目。設置_upsideDown_參數設置為True來扭轉這種行為。
**See also** [sliderPositionFromValue](qstyle.html#sliderPositionFromValue)( ) 。
```
QIcon QStyle.standardIcon (self, StandardPixmap?standardIcon, QStyleOption?option?=?None, QWidget?widget?=?None)
```
[
對于給定的返回一個圖標_standardIcon_。
該_standardIcon_是一個標準的像素圖,可以遵循一些現有的GUI風格或指引。該_option_參數可以定義相應的圖標時,用于傳遞所需的額外信息。該_widget_參數是可選的,也可以用來幫助圖標的決心。
](qicon.html)
[**Warning:**因為二進制兼容性的限制,這個功能是不是虛擬的。如果你想提供自己的圖標了](qicon.html)[QStyle](qstyle.html)子類,重新實現[standardIconImplementation](qstyle.html#standardIconImplementation)()槽在你的子類來代替。該standardIcon ( )函數將動態檢測插槽,并調用它。
這個函數是Qt 4.1中引入。
**See also** [standardIconImplementation](qstyle.html#standardIconImplementation)( ) 。
```
QIcon QStyle.standardIconImplementation (self, StandardPixmap?standardIcon, QStyleOption?option?=?None, QWidget?widget?=?None)
```
[
這種方法也是一個Qt槽與C + +的簽名`QIcon standardIconImplementation(QStyle::StandardPixmap,const QStyleOption * = 0,const QWidget * = 0) const`。
對于給定的返回一個圖標_standardIcon_。
](qicon.html)
[重新實現這個插槽來提供自己的圖標了](qicon.html)[QStyle](qstyle.html)子類,因為二進制兼容性的限制,[standardIcon](qstyle.html#standardIcon)( )函數( Qt 4.1中引入的)是不是虛擬的。相反,[standardIcon](qstyle.html#standardIcon)( )將動態檢測并調用_this_插槽。
該_standardIcon_是一個標準的像素圖,可以遵循一些現有的GUI風格或指引。該_option_參數可以定義相應的圖標時,用于傳遞所需的額外信息。該_widget_參數是可選的,也可以用來幫助圖標的決心。
這個函數是Qt 4.1中引入。
**See also** [standardIcon](qstyle.html#standardIcon)( ) 。
```
QPalette QStyle.standardPalette (self)
```
[
返回樣式的標準調色板。
需要注意的是在支持系統顏色系統中,不使用樣式的標準調色板。特別是,在Windows XP ,Vista和Mac的樣式不使用標準的調色板,但使用原生主題引擎。有了這些款式,你不應該設置QApplication.setStandardPalette ( )的調色板。
](qpalette.html)
```
QPixmap QStyle.standardPixmap (self, StandardPixmap?standardPixmap, QStyleOption?option?=?None, QWidget?widget?=?None)
```
[
這種方法是抽象的,應在任何子類中重新實現。
```
int QStyle.styleHint (self, StyleHint?stylehint, QStyleOption?option?=?None, QWidget?widget?=?None, QStyleHintReturn?returnData?=?None)
```
這種方法是抽象的,應在任何子類中重新實現。
返回表示指定樣式的整數_hint_對于給定的_widget_由提供的樣式描述_option_。
](qpixmap.html)
[_returnData_用于當查詢部件需要比整數, styleHint ()返回的更詳細的數據。請參閱](qpixmap.html)[QStyleHintReturn](qstylehintreturn.html)類描述的細節。
```
QRect QStyle.subControlRect (self, ComplexControl?cc, QStyleOptionComplex?opt, SubControl?sc, QWidget?widget?=?None)
```
[
這種方法是抽象的,應在任何子類中重新實現。
返回指定包含矩形_subControl_在給定的復雜_control_(由指定的樣式_option_) 。該矩形的屏幕坐標定義。
](qrect.html)
[該_option_參數是一個指向](qrect.html)[QStyleOptionComplex](qstyleoptioncomplex.html)或它的一個子類,并可以使用強制轉換為適當的類型[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。看[drawComplexControl](qstyle.html#drawComplexControl)( )了解詳情。該_widget_是可選的,可以包含其他信息的功能。
**See also** [drawComplexControl](qstyle.html#drawComplexControl)( ) 。
```
QRect QStyle.subElementRect (self, SubElement?subElement, QStyleOption?option, QWidget?widget?=?None)
```
[
這種方法是抽象的,應在任何子類中重新實現。
返回子區為給定的_element_在所提供的樣式描述_option_。返回矩形的屏幕坐標定義。
](qrect.html)
[該_widget_參數是可選的并且可以用來輔助確定的區域。該](qrect.html)[QStyleOption](qstyleoption.html)對象可以使用強制轉換為適當的類型[qstyleoption_cast](qstyleoption.html#qstyleoption_cast)()函數。請參閱下表為適當_option_施放:
| Sub Element | [QStyleOption](qstyleoption.html) Subclass |
| --- | --- |
| [SE_PushButtonContents](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_PushButtonFocusRect](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_CheckBoxIndicator](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_CheckBoxContents](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_CheckBoxFocusRect](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_RadioButtonIndicator](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_RadioButtonContents](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_RadioButtonFocusRect](qstyle.html#SubElement-enum) | [QStyleOptionButton](qstyleoptionbutton.html) |
| [SE_ComboBoxFocusRect](qstyle.html#SubElement-enum) | [QStyleOptionComboBox](qstyleoptioncombobox.html) |
| [SE_Q3DockWindowHandleRect](qstyle.html#SubElement-enum) | [QStyleOptionQ3DockWindow](index.htm) |
| [SE_ProgressBarGroove](qstyle.html#SubElement-enum) | [QStyleOptionProgressBar](qstyleoptionprogressbar.html) |
| [SE_ProgressBarContents](qstyle.html#SubElement-enum) | [QStyleOptionProgressBar](qstyleoptionprogressbar.html) |
| [SE_ProgressBarLabel](qstyle.html#SubElement-enum) | [QStyleOptionProgressBar](qstyleoptionprogressbar.html) |
```
QStyle.unpolish (self, QWidget)
```
取消初始化給定的_widget_的外觀。
此功能是對應到[polish](qstyle.html#polish)( ) 。這就是所謂的每一個部件打磨每當風格是動態變化的,前者的風格有unpolish其設置之前,新的樣式可以再次擦亮他們。
注意, unpolish ()將只如果窗口部件被破壞調用。這可能會導致問題在某些情況下,例如,如果你從UI中刪除一個小部件,對其進行緩存,然后重新插入它的風格已經改變之后,一些Qt的類的緩存其部件。
**See also** [polish](qstyle.html#polish)( ) 。
```
QStyle.unpolish (self, QApplication)
```
這是一個重載函數。
取消初始化給定的_application_。
```
Qt.Alignment QStyle.visualAlignment (Qt.LayoutDirection?direction, Qt.Alignment?alignment)
```
[](index.htm)
[術將_alignment_的](index.htm)[Qt.AlignLeft](qt.html#AlignmentFlag-enum) or [Qt.AlignRight](qt.html#AlignmentFlag-enum)無[Qt.AlignAbsolute](qt.html#AlignmentFlag-enum)成[Qt.AlignLeft](qt.html#AlignmentFlag-enum) or [Qt.AlignRight](qt.html#AlignmentFlag-enum)同[Qt.AlignAbsolute](qt.html#AlignmentFlag-enum)根據布局_direction_。其他的對齊標志保持不變。
如果沒有指定水平對齊,該函數返回的默認對齊方式為給定的布局_direction_。
[QWidget.layoutDirection](qwidget.html#layoutDirection-prop)
```
QPoint QStyle.visualPos (Qt.LayoutDirection?direction, QRect?boundingRect, QPoint?logicalPos)
```
[
返回給定_logicalPosition_轉換到基于指定的屏幕坐標_direction_。該_boundingRectangle_執行轉換時使用。
](qpoint.html)
[**See also**](qpoint.html) [QWidget.layoutDirection](qwidget.html#layoutDirection-prop)。
```
QRect QStyle.visualRect (Qt.LayoutDirection?direction, QRect?boundingRect, QRect?logicalRect)
```
[
返回給定_logicalRectangle_轉換到基于指定的屏幕坐標_direction_。該_boundingRectangle_執行轉換時使用。
](qrect.html)
[這個功能被提供以支持從右到左的桌面,并且通常用在該實施](qrect.html)[subControlRect](qstyle.html#subControlRect)()函數。
**See also** [QWidget.layoutDirection](qwidget.html#layoutDirection-prop)。
- PyQt4 中文文檔
- PyQt Class Reference
- QAbstractAnimation Class Reference
- QAbstractButton Class Reference
- QAbstractEventDispatcher Class Reference
- QAbstractExtensionFactory Class Reference
- QAbstractExtensionManager Class Reference
- QAbstractFileEngine Class Reference
- QAbstractFileEngineHandler Class Reference
- QAbstractFileEngineIterator Class Reference
- QAbstractFormBuilder Class Reference
- QAbstractGraphicsShapeItem Class Reference
- QAbstractItemDelegate Class Reference
- QAbstractItemModel Class Reference
- QAbstractItemView Class Reference
- QAbstractListModel Class Reference
- QAbstractMessageHandler Class Reference
- QAbstractNetworkCache Class Reference
- QAbstractPrintDialog Class Reference
- QAbstractProxyModel Class Reference
- QAbstractScrollArea Class Reference
- QAbstractSlider Class Reference
- QAbstractSocket Class Reference
- QAbstractSpinBox Class Reference
- QAbstractState Class Reference
- QAbstractTableModel Class Reference
- QAbstractTextDocumentLayout Class Reference
- QAbstractTransition Class Reference
- QAbstractUriResolver Class Reference
- QAbstractVideoBuffer Class Reference
- QAbstractVideoSurface Class Reference
- QAbstractXmlNodeModel Class Reference
- QAbstractXmlReceiver Class Reference
- QAction Class Reference
- QActionEvent Class Reference
- QActionGroup Class Reference
- QAnimationGroup Class Reference
- QApplication Class Reference
- QAssistantClient Class Reference
- QAudio Class Reference
- QAudioDeviceInfo Class Reference
- QAudioFormat Class Reference
- QAudioInput Class Reference
- QAudioOutput Class Reference
- QAuthenticator Class Reference
- QBasicTimer Class Reference
- QBitArray Class Reference
- QBitmap Class Reference
- QBoxLayout Class Reference
- QBrush Class Reference
- QBuffer Class Reference
- QButtonGroup Class Reference
- QByteArray Class Reference
- QByteArrayMatcher Class Reference
- QCalendarWidget Class Reference
- QChar Class Reference
- QCheckBox Class Reference
- QChildEvent Class Reference
- QClipboard Class Reference
- QCloseEvent Class Reference
- QColor Class Reference
- QColorDialog Class Reference
- QColumnView Class Reference
- QComboBox Class Reference
- QCommandLinkButton Class Reference
- QCommonStyle Class Reference
- QCompleter Class Reference
- QConicalGradient Class Reference
- QContextMenuEvent Class Reference
- QCoreApplication Class Reference
- QCryptographicHash Class Reference
- QCursor Class Reference
- QDataStream Class Reference
- QDataWidgetMapper Class Reference
- QDate Class Reference
- QDateEdit Class Reference
- QDateTime Class Reference
- QDateTimeEdit Class Reference
- QDBus Class Reference
- QDBusAbstractAdaptor Class Reference
- QDBusAbstractInterface Class Reference
- QDBusArgument Class Reference
- QDBusConnection Class Reference
- QDBusConnectionInterface Class Reference
- QDBusError Class Reference
- QDBusInterface Class Reference
- QDBusMessage Class Reference
- QDBusObjectPath Class Reference
- QDBusPendingCall Class Reference
- QDBusPendingCallWatcher Class Reference
- QDBusPendingReply Class Reference
- QDBusReply Class Reference
- QDBusServiceWatcher Class Reference
- QDBusSignature Class Reference
- QDBusUnixFileDescriptor Class Reference
- QDBusVariant Class Reference
- QDeclarativeComponent Class Reference
- QDeclarativeContext Class Reference
- QDeclarativeEngine Class Reference
- QDeclarativeError Class Reference
- QDeclarativeExpression Class Reference
- QDeclarativeExtensionPlugin Class Reference
- QDeclarativeImageProvider Class Reference
- QDeclarativeItem Class Reference
- QDeclarativeListReference Class Reference
- QDeclarativeNetworkAccessManagerFactory Class Reference
- QDeclarativeParserStatus Class Reference
- QDeclarativeProperty Class Reference
- QDeclarativePropertyMap Class Reference
- QDeclarativePropertyValueSource Class Reference
- QDeclarativeScriptString Class Reference
- QDeclarativeView Class Reference
- QDesignerActionEditorInterface Class Reference
- QDesignerContainerExtension Class Reference
- QDesignerCustomWidgetCollectionInterface Class Reference
- QDesignerCustomWidgetInterface Class Reference
- QDesignerFormEditorInterface Class Reference
- QDesignerFormWindowCursorInterface Class Reference
- QDesignerFormWindowInterface Class Reference
- QDesignerFormWindowManagerInterface Class Reference
- QDesignerMemberSheetExtension Class Reference
- QDesignerObjectInspectorInterface Class Reference
- QDesignerPropertyEditorInterface Class Reference
- QDesignerPropertySheetExtension Class Reference
- QDesignerTaskMenuExtension Class Reference
- QDesignerWidgetBoxInterface Class Reference
- QDesktopServices Class Reference
- QDesktopWidget Class Reference
- QDial Class Reference
- QDialog Class Reference
- QDialogButtonBox Class Reference
- QDir Class Reference
- QDirIterator Class Reference
- QDirModel Class Reference
- QDockWidget Class Reference
- QDomAttr Class Reference
- QDomCDATASection Class Reference
- QDomCharacterData Class Reference
- QDomComment Class Reference
- QDomDocument Class Reference
- QDomDocumentFragment Class Reference
- QDomDocumentType Class Reference
- QDomElement Class Reference
- QDomEntity Class Reference
- QDomEntityReference Class Reference
- QDomImplementation Class Reference
- QDomNamedNodeMap Class Reference
- QDomNode Class Reference
- QDomNodeList Class Reference
- QDomNotation Class Reference
- QDomProcessingInstruction Class Reference
- QDomText Class Reference
- QDoubleSpinBox Class Reference
- QDoubleValidator Class Reference
- QDrag Class Reference
- QDragEnterEvent Class Reference
- QDragLeaveEvent Class Reference
- QDragMoveEvent Class Reference
- QDropEvent Class Reference
- QDynamicPropertyChangeEvent Class Reference
- QEasingCurve Class Reference
- QElapsedTimer Class Reference
- QErrorMessage Class Reference
- QEvent Class Reference
- QEventLoop Class Reference
- QEventTransition Class Reference
- QExtensionFactory Class Reference
- QExtensionManager Class Reference
- QFile Class Reference
- QFileDialog Class Reference
- QFileIconProvider Class Reference
- QFileInfo Class Reference
- QFileOpenEvent Class Reference
- QFileSystemModel Class Reference
- QFileSystemWatcher Class Reference
- QFinalState Class Reference
- QFocusEvent Class Reference
- QFocusFrame Class Reference
- QFont Class Reference
- QFontComboBox Class Reference
- QFontDatabase Class Reference
- QFontDialog Class Reference
- QFontInfo Class Reference
- QFontMetrics Class Reference
- QFontMetricsF Class Reference
- QFormBuilder Class Reference
- QFormLayout Class Reference
- QFrame Class Reference
- QFSFileEngine Class Reference
- QFtp Class Reference
- QGenericArgument Class Reference
- QGenericReturnArgument Class Reference
- QGesture Class Reference
- QGestureEvent Class Reference
- QGestureRecognizer Class Reference
- QGL Class Reference
- QGLBuffer Class Reference
- QGLColormap Class Reference
- QGLContext Class Reference
- QGLFormat Class Reference
- QGLFramebufferObject Class Reference
- QGLFramebufferObjectFormat Class Reference
- QGLPixelBuffer Class Reference
- QGLShader Class Reference
- QGLShaderProgram Class Reference
- QGLWidget Class Reference
- QGlyphRun Class Reference
- QGradient Class Reference
- QGraphicsAnchor Class Reference
- QGraphicsAnchorLayout Class Reference
- QGraphicsBlurEffect Class Reference
- QGraphicsColorizeEffect Class Reference
- QGraphicsDropShadowEffect Class Reference
- QGraphicsEffect Class Reference
- QGraphicsEllipseItem Class Reference
- QGraphicsGridLayout Class Reference
- QGraphicsItem Class Reference
- QGraphicsItemAnimation Class Reference
- QGraphicsItemGroup Class Reference
- QGraphicsLayout Class Reference
- QGraphicsLayoutItem Class Reference
- QGraphicsLinearLayout Class Reference
- QGraphicsLineItem Class Reference
- QGraphicsObject Class Reference
- QGraphicsOpacityEffect Class Reference
- QGraphicsPathItem Class Reference
- QGraphicsPixmapItem Class Reference
- QGraphicsPolygonItem Class Reference
- QGraphicsProxyWidget Class Reference
- QGraphicsRectItem Class Reference
- QGraphicsRotation Class Reference
- QGraphicsScale Class Reference
- QGraphicsScene Class Reference
- QGraphicsSceneContextMenuEvent Class Reference
- QGraphicsSceneDragDropEvent Class Reference
- QGraphicsSceneEvent Class Reference
- QGraphicsSceneHelpEvent Class Reference
- QGraphicsSceneHoverEvent Class Reference
- QGraphicsSceneMouseEvent Class Reference
- QGraphicsSceneMoveEvent Class Reference
- QGraphicsSceneResizeEvent Class Reference
- QGraphicsSceneWheelEvent Class Reference
- QGraphicsSimpleTextItem Class Reference
- QGraphicsSvgItem Class Reference
- QGraphicsTextItem Class Reference
- QGraphicsTransform Class Reference
- QGraphicsView Class Reference
- QGraphicsWebView Class Reference
- QGraphicsWidget Class Reference
- QGridLayout Class Reference
- QGroupBox Class Reference
- QHBoxLayout Class Reference
- QHeaderView Class Reference
- QHelpContentItem Class Reference
- QHelpContentModel Class Reference
- QHelpContentWidget Class Reference
- QHelpEngine Class Reference
- QHelpEngineCore Class Reference
- QHelpEvent Class Reference
- QHelpIndexModel Class Reference
- QHelpIndexWidget Class Reference
- QHelpSearchEngine Class Reference
- QHelpSearchQuery Class Reference
- QHelpSearchQueryWidget Class Reference
- QHelpSearchResultWidget Class Reference
- QHideEvent Class Reference
- QHistoryState Class Reference
- QHostAddress Class Reference
- QHostInfo Class Reference
- QHoverEvent Class Reference
- QHttp Class Reference
- QHttpHeader Class Reference
- QHttpMultiPart Class Reference
- QHttpPart Class Reference
- QHttpRequestHeader Class Reference
- QHttpResponseHeader Class Reference
- QIcon Class Reference
- QIconDragEvent Class Reference
- QIconEngine Class Reference
- QIconEngineV2 Class Reference
- QIdentityProxyModel Class Reference
- QImage Class Reference
- QImageIOHandler Class Reference
- QImageReader Class Reference
- QImageWriter Class Reference
- QInputContext Class Reference
- QInputContextFactory Class Reference
- QInputDialog Class Reference
- QInputEvent Class Reference
- QInputMethodEvent Class Reference
- QIntValidator Class Reference
- QIODevice Class Reference
- QItemDelegate Class Reference
- QItemEditorCreatorBase Class Reference
- QItemEditorFactory Class Reference
- QItemSelection Class Reference
- QItemSelectionModel Class Reference
- QItemSelectionRange Class Reference
- QKeyEvent Class Reference
- QKeyEventTransition Class Reference
- QKeySequence Class Reference
- QLabel Class Reference
- QLatin1Char Class Reference
- QLatin1String Class Reference
- QLayout Class Reference
- QLayoutItem Class Reference
- QLCDNumber Class Reference
- QLibrary Class Reference
- QLibraryInfo Class Reference
- QLine Class Reference
- QLinearGradient Class Reference
- QLineEdit Class Reference
- QLineF Class Reference
- QListView Class Reference
- QListWidget Class Reference
- QListWidgetItem Class Reference
- QLocale Class Reference
- QLocalServer Class Reference
- QLocalSocket Class Reference
- QMainWindow Class Reference
- QMargins Class Reference
- QMatrix Class Reference
- QMatrix2x2 Class Reference
- QMatrix2x3 Class Reference
- QMatrix2x4 Class Reference
- QMatrix3x2 Class Reference
- QMatrix3x3 Class Reference
- QMatrix3x4 Class Reference
- QMatrix4x2 Class Reference
- QMatrix4x3 Class Reference
- QMatrix4x4 Class Reference
- QMdiArea Class Reference
- QMdiSubWindow Class Reference
- QMenu Class Reference
- QMenuBar Class Reference
- QMessageBox Class Reference
- QMetaClassInfo Class Reference
- QMetaEnum Class Reference
- QMetaMethod Class Reference
- QMetaObject Class Reference
- QMetaProperty Class Reference
- QMetaType Class Reference
- QMimeData Class Reference
- QMimeSource Class Reference
- QModelIndex Class Reference
- QMouseEvent Class Reference
- QMouseEventTransition Class Reference
- QMoveEvent Class Reference
- QMovie Class Reference
- QMutex Class Reference
- QMutexLocker Class Reference
- QNetworkAccessManager Class Reference
- QNetworkAddressEntry Class Reference
- QNetworkCacheMetaData Class Reference
- QNetworkConfiguration Class Reference
- QNetworkConfigurationManager Class Reference
- QNetworkCookie Class Reference
- QNetworkCookieJar Class Reference
- QNetworkDiskCache Class Reference
- QNetworkInterface Class Reference
- QNetworkProxy Class Reference
- QNetworkProxyFactory Class Reference
- QNetworkProxyQuery Class Reference
- QNetworkReply Class Reference
- QNetworkRequest Class Reference
- QNetworkSession Class Reference
- QObject Class Reference
- QObjectCleanupHandler Class Reference
- QPageSetupDialog Class Reference
- QPaintDevice Class Reference
- QPaintEngine Class Reference
- QPaintEngineState Class Reference
- QPainter Class Reference
- QPainterPath Class Reference
- QPainterPathStroker Class Reference
- QPaintEvent Class Reference
- QPalette Class Reference
- QPanGesture Class Reference
- QParallelAnimationGroup Class Reference
- QPauseAnimation Class Reference
- QPen Class Reference
- QPersistentModelIndex Class Reference
- QPicture Class Reference
- QPictureIO Class Reference
- QPinchGesture Class Reference
- QPixmap Class Reference
- QPixmapCache Class Reference
- QPlainTextDocumentLayout Class Reference
- QPlainTextEdit Class Reference
- QPluginLoader Class Reference
- QPoint Class Reference
- QPointF Class Reference
- QPolygon Class Reference
- QPolygonF Class Reference
- QPrintDialog Class Reference
- QPrintEngine Class Reference
- QPrinter Class Reference
- QPrinterInfo Class Reference
- QPrintPreviewDialog Class Reference
- QPrintPreviewWidget Class Reference
- QProcess Class Reference
- QProcessEnvironment Class Reference
- QProgressBar Class Reference
- QProgressDialog Class Reference
- QPropertyAnimation Class Reference
- QProxyModel Class Reference
- QPushButton Class Reference
- QPyDeclarativePropertyValueSource Class Reference
- QPyDesignerContainerExtension Class Reference
- QPyDesignerCustomWidgetCollectionPlugin Class Reference
- QPyDesignerCustomWidgetPlugin Class Reference
- QPyDesignerMemberSheetExtension Class Reference
- QPyDesignerPropertySheetExtension Class Reference
- QPyDesignerTaskMenuExtension Class Reference
- QPyNullVariant Class Reference
- QPyTextObject Class Reference
- QQuaternion Class Reference
- QRadialGradient Class Reference
- QRadioButton Class Reference
- QRawFont Class Reference
- QReadLocker Class Reference
- QReadWriteLock Class Reference
- QRect Class Reference
- QRectF Class Reference
- QRegExp Class Reference
- QRegExpValidator Class Reference
- QRegion Class Reference
- QResizeEvent Class Reference
- QResource Class Reference
- QRubberBand Class Reference
- QRunnable Class Reference
- QScriptClass Class Reference
- QScriptClassPropertyIterator Class Reference
- QScriptContext Class Reference
- QScriptContextInfo Class Reference
- QScriptEngine Class Reference
- QScriptEngineAgent Class Reference
- QScriptEngineDebugger Class Reference
- QScriptString Class Reference
- QScriptSyntaxCheckResult Class Reference
- QScriptValue Class Reference
- QScriptValueIterator Class Reference
- QScrollArea Class Reference
- QScrollBar Class Reference
- QSemaphore Class Reference
- QSequentialAnimationGroup Class Reference
- QSessionManager Class Reference
- QSettings Class Reference
- QSharedMemory Class Reference
- QShortcut Class Reference
- QShortcutEvent Class Reference
- QShowEvent Class Reference
- QSignalMapper Class Reference
- QSignalTransition Class Reference
- QSimpleXmlNodeModel Class Reference
- QSize Class Reference
- QSizeF Class Reference
- QSizeGrip Class Reference
- QSizePolicy Class Reference
- QSlider Class Reference
- QSocketNotifier Class Reference
- QSortFilterProxyModel Class Reference
- QSound Class Reference
- QSourceLocation Class Reference
- QSpacerItem Class Reference
- QSpinBox Class Reference
- QSplashScreen Class Reference
- QSplitter Class Reference
- QSplitterHandle Class Reference
- QSql Class Reference
- QSqlDatabase Class Reference
- QSqlDriver Class Reference
- QSqlDriverCreatorBase Class Reference
- QSqlError Class Reference
- QSqlField Class Reference
- QSqlIndex Class Reference
- QSqlQuery Class Reference
- QSqlQueryModel Class Reference
- QSqlRecord Class Reference
- QSqlRelation Class Reference
- QSqlRelationalDelegate Class Reference
- QSqlRelationalTableModel Class Reference
- QSqlResult Class Reference
- QSqlTableModel Class Reference
- Qt4.7文檔翻譯:Qt樣式單參考,Qt Style Sheets Reference
- QSsl Class Reference
- QSslCertificate Class Reference
- QSslCipher Class Reference
- QSslConfiguration Class Reference
- QSslError Class Reference
- QSslKey Class Reference
- QSslSocket Class Reference
- QStackedLayout Class Reference
- QStackedWidget Class Reference
- QStandardItem Class Reference
- QStandardItemModel Class Reference
- QState Class Reference
- QStateMachine Class Reference
- QStaticText Class Reference
- QStatusBar Class Reference
- QStatusTipEvent Class Reference
- QString Class Reference
- QStringList Class Reference
- QStringListModel Class Reference
- QStringMatcher Class Reference
- QStringRef Class Reference
- QStyle Class Reference
- QStyledItemDelegate Class Reference
- QStyleFactory Class Reference
- QStyleHintReturn Class Reference
- QStyleHintReturnMask Class Reference
- QStyleHintReturnVariant Class Reference
- QStyleOption Class Reference
- QStyleOptionButton Class Reference
- QStyleOptionComboBox Class Reference
- QStyleOptionComplex Class Reference
- QStyleOptionDockWidget Class Reference
- QStyleOptionDockWidgetV2 Class Reference
- QStyleOptionFocusRect Class Reference
- QStyleOptionFrame Class Reference
- QStyleOptionFrameV2 Class Reference
- QStyleOptionFrameV3 Class Reference
- QStyleOptionGraphicsItem Class Reference
- QStyleOptionGroupBox Class Reference
- QStyleOptionHeader Class Reference
- QStyleOptionMenuItem Class Reference
- QStyleOptionProgressBar Class Reference
- QStyleOptionProgressBarV2 Class Reference
- QStyleOptionRubberBand Class Reference
- QStyleOptionSizeGrip Class Reference
- QStyleOptionSlider Class Reference
- QStyleOptionSpinBox Class Reference
- QStyleOptionTab Class Reference
- QStyleOptionTabBarBase Class Reference
- QStyleOptionTabBarBaseV2 Class Reference
- QStyleOptionTabV2 Class Reference
- QStyleOptionTabV3 Class Reference
- QStyleOptionTabWidgetFrame Class Reference
- QStyleOptionTabWidgetFrameV2 Class Reference
- QStyleOptionTitleBar Class Reference
- QStyleOptionToolBar Class Reference
- QStyleOptionToolBox Class Reference
- QStyleOptionToolBoxV2 Class Reference
- QStyleOptionToolButton Class Reference
- QStyleOptionViewItem Class Reference
- QStyleOptionViewItemV2 Class Reference
- QStyleOptionViewItemV3 Class Reference
- QStyleOptionViewItemV4 Class Reference
- QStylePainter Class Reference
- QSvgGenerator Class Reference
- QSvgRenderer Class Reference
- QSvgWidget Class Reference
- QSwipeGesture Class Reference
- QSyntaxHighlighter Class Reference
- QSysInfo Class Reference
- QSystemLocale Class Reference
- QSystemSemaphore Class Reference
- QSystemTrayIcon Class Reference
- Qt Class Reference
- QTabBar Class Reference
- QTabletEvent Class Reference
- QTableView Class Reference
- QTableWidget Class Reference
- QTableWidgetItem Class Reference
- QTableWidgetSelectionRange Class Reference
- QTabWidget Class Reference
- QTapAndHoldGesture Class Reference
- QTapGesture Class Reference
- QTcpServer Class Reference
- QTcpSocket Class Reference
- QTemporaryFile Class Reference
- QTest Class Reference
- QTextBlock Class Reference
- QTextBlockFormat Class Reference
- QTextBlockGroup Class Reference
- QTextBlockUserData Class Reference
- QTextBoundaryFinder Class Reference
- QTextBrowser Class Reference
- QTextCharFormat Class Reference
- QTextCodec Class Reference
- QTextCursor Class Reference
- QTextDecoder Class Reference
- QTextDocument Class Reference
- QTextDocumentFragment Class Reference
- QTextDocumentWriter Class Reference
- QTextEdit Class Reference
- QTextEncoder Class Reference
- QTextFormat Class Reference
- QTextFragment Class Reference
- QTextFrame Class Reference
- QTextFrameFormat Class Reference
- QTextImageFormat Class Reference
- QTextInlineObject Class Reference
- QTextItem Class Reference
- QTextLayout Class Reference
- QTextLength Class Reference
- QTextLine Class Reference
- QTextList Class Reference
- QTextListFormat Class Reference
- QTextObject Class Reference
- QTextObjectInterface Class Reference
- QTextOption Class Reference
- QTextStream Class Reference
- QTextTable Class Reference
- QTextTableCell Class Reference
- QTextTableCellFormat Class Reference
- QTextTableFormat Class Reference
- QThread Class Reference
- QThreadPool Class Reference
- QTime Class Reference
- QTimeEdit Class Reference
- QTimeLine Class Reference
- QTimer Class Reference
- QTimerEvent Class Reference
- QToolBar Class Reference
- QToolBox Class Reference
- QToolButton Class Reference
- QToolTip Class Reference
- QTouchEvent Class Reference
- Reference
- QTransform Class Reference
- QTranslator Class Reference
- QTreeView Class Reference
- QTreeWidget Class Reference
- QTreeWidgetItem Class Reference
- QTreeWidgetItemIterator Class Reference
- QUdpSocket Class Reference
- QUndoCommand Class Reference
- QUndoGroup Class Reference
- QUndoStack Class Reference
- QUndoView Class Reference
- QUrl Class Reference
- QUrlInfo Class Reference
- QUuid Class Reference
- QValidator Class Reference
- QVariant Class Reference
- QVariantAnimation Class Reference
- QVBoxLayout Class Reference
- QVector2D Class Reference
- QVector3D Class Reference
- QVector4D Class Reference
- QVideoFrame Class Reference
- QVideoSurfaceFormat Class Reference
- QWaitCondition Class Reference
- QWebDatabase Class Reference
- QWebElement Class Reference
- QWebElementCollection Class Reference
- QWebFrame Class Reference
- QWebHistory Class Reference
- QWebHistoryInterface Class Reference
- QWebHistoryItem Class Reference
- QWebHitTestResult Class Reference
- QWebInspector Class Reference
- QWebPage Class Reference
- QWebPluginFactory Class Reference
- QWebSecurityOrigin Class Reference
- QWebSettings Class Reference
- QWebView Class Reference
- QWhatsThis Class Reference
- QWhatsThisClickedEvent Class Reference
- QWheelEvent Class Reference
- QWidget Class Reference
- QWidgetAction Class Reference
- QWidgetItem Class Reference
- QWindowStateChangeEvent Class Reference
- QWizard Class Reference
- QWizardPage Class Reference
- QWorkspace Class Reference
- QWriteLocker Class Reference
- QX11EmbedContainer Class Reference
- QX11EmbedWidget Class Reference
- QX11Info Class Reference
- QXmlAttributes Class Reference
- QXmlContentHandler Class Reference
- QXmlDeclHandler Class Reference
- QXmlDefaultHandler Class Reference
- QXmlDTDHandler Class Reference
- QXmlEntityResolver Class Reference
- QXmlErrorHandler Class Reference
- QXmlFormatter Class Reference
- QXmlInputSource Class Reference
- QXmlItem Class Reference
- QXmlLexicalHandler Class Reference
- QXmlLocator Class Reference
- QXmlName Class Reference
- QXmlNamePool Class Reference
- QXmlNamespaceSupport Class Reference
- QXmlNodeModelIndex Class Reference
- QXmlParseException Class Reference
- QXmlQuery Class Reference
- QXmlReader Class Reference
- QXmlResultItems Class Reference
- QXmlSchema Class Reference
- QXmlSchemaValidator Class Reference
- QXmlSerializer Class Reference
- QXmlSimpleReader Class Reference
- QXmlStreamAttribute Class Reference
- QXmlStreamAttributes Class Reference
- QXmlStreamEntityDeclaration Class Reference
- QXmlStreamEntityResolver Class Reference
- QXmlStreamNamespaceDeclaration Class Reference
- QXmlStreamNotationDeclaration Class Reference
- QXmlStreamReader Class Reference
- QXmlStreamWriter Class Reference