PythonQt.QtGui.QStyle · declarations 001
alignedRect
alignedRect(direction: Any, alignment: Any, size: Any, rectangle: Any) -> Any
X.alignedRect(direction, alignment, size, rectangle) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[static] QRect QStyle::alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment, const QSize \&size, const QRect \&rectangle)
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.
Upstream PySide2 reference signatures (binding differences may apply):
alignedRect(direction: PySide2.QtCore.Qt.LayoutDirection, alignment: PySide2.QtCore.Qt.Alignment, size: PySide2.QtCore.QSize, rectangle: PySide2.QtCore.QRect) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#alignedRect
combinedLayoutSpacing
combinedLayoutSpacing(controls1: Any, controls2: Any, orientation: Any, option: Any, widget: Any) -> int
X.combinedLayoutSpacing(controls1, controls2, orientation, option, widget) -> int
Supplemental documentation: Qt 5 reference:
int QStyle::combinedLayoutSpacing(QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option \= nullptr, QWidget *widget \= nullptr) const
Returns the spacing that should be used between controls1 and controls2 in a layout.
orientation specifies whether the controls are laid out side by side or stacked
vertically. The option parameter can be used to pass extra information about the
parent widget. The widget parameter is optional and can also be used if option is
nullptr.
controls1 and controls2 are OR-combination of zero or more control types.
This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
This function was introduced in Qt 4.3.
See also layoutSpacing().
Upstream PySide2 reference signatures (binding differences may apply):
combinedLayoutSpacing(self, controls1: PySide2.QtWidgets.QSizePolicy.ControlTypes, controls2: PySide2.QtWidgets.QSizePolicy.ControlTypes, orientation: PySide2.QtCore.Qt.Orientation, option: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#combinedLayoutSpacing
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QStyle.destroyed; argument details are not documented.
drawComplexControl
drawComplexControl(cc: Any, opt: Any, p: Any, widget: Any) -> None
X.drawComplexControl(cc, opt, p, widget)
Supplemental documentation: Qt 5 reference:
[pure virtual] void QStyle::drawComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget \= nullptr) const
Draws the given control using the provided painter with the style options specified by option.
The widget argument is optional and can be used as aid in drawing the control.
The option parameter is a pointer to a
QStyleOptionComplex
object that can be cast to the correct subclass using the
qstyleoption_cast()
function. Note that the rect member of the specified option must be in logical
coordinates. Reimplementations of this function should use
visualRect() to change the
logical coordinates into screen coordinates before calling the
drawPrimitive() or
drawControl() function.
The table below is listing the complex control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
| Complex Control | QStyleOptionComplex Subclass | Style Flag | Remark |
|---|---|---|---|
| CC_SpinBox | QStyleOptionSpinBox | State_Enabled | Set if the spin box is enabled. |
| State_HasFocus | Set if the spin box has input focus. | ||
| CC_ComboBox | QStyleOptionComboBox | State_Enabled | Set if the combobox is enabled. |
| State_HasFocus | Set if the combobox has input focus. | ||
| CC_ScrollBar | QStyleOptionSlider | State_Enabled | Set if the scroll bar is enabled. |
| State_HasFocus | Set if the scroll bar has input focus. | ||
| CC_Slider | QStyleOptionSlider | State_Enabled | Set if the slider is enabled. |
| State_HasFocus | Set if the slider has input focus. | ||
| CC_Dial | QStyleOptionSlider | State_Enabled | Set if the dial is enabled. |
| State_HasFocus | Set if the dial has input focus. | ||
| CC_ToolButton | QStyleOptionToolButton | State_Enabled | Set if the tool button is enabled. |
| State_HasFocus | Set if the tool button has input focus. | ||
| State_DownArrow | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). | ||
| State_On | Set if the tool button is a toggle button and is toggled on. | ||
| State_AutoRaise | Set if the tool button has auto-raise enabled. | ||
| State_Raised | Set if the button is not down, not on, and doesn't contain the mouse when auto-raise is enabled. | ||
| CC_TitleBar | QStyleOptionTitleBar | State_Enabled | Set if the title bar is enabled. |
See also drawPrimitive() and drawControl().
Upstream PySide2 reference signatures (binding differences may apply):
drawComplexControl(self, cc: PySide2.QtWidgets.QStyle.ComplexControl, opt: PySide2.QtWidgets.QStyleOptionComplex, p: PySide2.QtGui.QPainter, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#drawComplexControl
drawControl
drawControl(element: Any, opt: Any, p: Any, w: Any) -> None
X.drawControl(element, opt, p, w)
Supplemental documentation: Qt 5 reference:
[pure virtual] void QStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget \= nullptr) const
Draws the given element with the provided painter with the style options specified by option.
The widget argument is optional and can be used as aid in drawing the control. The option parameter is a pointer to a QStyleOption object that can be cast to the correct subclass using the qstyleoption_cast() function.
The table below is listing the control elements and their associated style option subclass. The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
Note that if a control element is not listed here, it is because it uses a plain QStyleOption object.
| Control Element | QStyleOption Subclass | Style Flag | Remark |
|---|---|---|---|
| CE_MenuItem, CE_MenuBarItem | QStyleOptionMenuItem | State_Selected | The menu item is currently selected item. |
| State_Enabled | The item is enabled. | ||
| State_DownArrow | Indicates that a scroll down arrow should be drawn. | ||
| State_UpArrow | Indicates that a scroll up arrow should be drawn | ||
| State_HasFocus | Set if the menu bar has input focus. | ||
| CE_PushButton, CE_PushButtonBevel, CE_PushButtonLabel | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
| State_HasFocus | Set if the button has input focus. | ||
| State_Raised | Set if the button is not down, not on and not flat. | ||
| State_On | Set if the button is a toggle button and is toggled on. | ||
| State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). | ||
| CE_RadioButton, CE_RadioButtonLabel, CE_CheckBox, CE_CheckBoxLabel | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
| State_HasFocus | Set if the button has input focus. | ||
| State_On | Set if the button is checked. | ||
| State_Off | Set if the button is not checked. | ||
| State_NoChange | Set if the button is in the NoChange state. | ||
| State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). | ||
| CE_ProgressBarContents, CE_ProgressBarLabel, CE_ProgressBarGroove | QStyleOptionProgressBar | State_Enabled | Set if the progress bar is enabled. |
| State_HasFocus | Set if the progress bar has input focus. | ||
| CE_Header, CE_HeaderSection, CE_HeaderLabel | QStyleOptionHeader | ||
| CE_TabBarTab, CE_TabBarTabShape, CE_TabBarTabLabel | QStyleOptionTab | State_Enabled | Set if the tab bar is enabled. |
| State_Selected | The tab bar is the currently selected tab bar. | ||
| State_HasFocus | Set if the tab bar tab has input focus. | ||
| CE_ToolButtonLabel | QStyleOptionToolButton | State_Enabled | Set if the tool button is enabled. |
| State_HasFocus | Set if the tool button has input focus. | ||
| State_Sunken | Set if the tool button is down (i.e., a mouse button or the space bar is pressed). | ||
| State_On | Set if the tool button is a toggle button and is toggled on. | ||
| State_AutoRaise | Set if the tool button has auto-raise enabled. | ||
| State_MouseOver | Set if the mouse pointer is over the tool button. | ||
| State_Raised | Set if the button is not down and is not on. | ||
| CE_ToolBoxTab | QStyleOptionToolBox | State_Selected | The tab is the currently selected tab. |
| CE_HeaderSection | QStyleOptionHeader | State_Sunken | Indicates that the section is pressed. |
| State_UpArrow | Indicates that the sort indicator should be pointing up. | ||
| State_DownArrow | Indicates that the sort indicator should be pointing down. |
See also drawPrimitive() and drawComplexControl().
Upstream PySide2 reference signatures (binding differences may apply):
drawControl(self, element: PySide2.QtWidgets.QStyle.ControlElement, opt: PySide2.QtWidgets.QStyleOption, p: PySide2.QtGui.QPainter, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#drawControl
drawItemPixmap
drawItemPixmap(painter: Any, rect: Any, alignment: int, pixmap: Any) -> None
X.drawItemPixmap(painter, rect, alignment, pixmap)
Supplemental documentation: Qt 5 reference:
[virtual] void QStyle::drawItemPixmap(QPainter *painter, const QRect \&rectangle, int alignment, const QPixmap \&pixmap) const
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.
See also drawItemText().
Upstream PySide2 reference signatures (binding differences may apply):
drawItemPixmap(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRect, alignment: int, pixmap: PySide2.QtGui.QPixmap) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#drawItemPixmap
drawItemText
drawItemText(painter: Any, rect: Any, arg2: flags, pal: Any, enabled: bool, text: str, textRole: Any) -> None
X.drawItemText(painter, rect, flags, pal, enabled, text, textRole)
Supplemental documentation: Qt 5 reference:
[virtual] void QStyle::drawItemText(QPainter *painter, const QRect \&rectangle, int alignment, const QPalette \&palette, bool enabled, const QString \&text, QPalette::ColorRole textRole \= QPalette::NoRole) const
Draws the given text in the specified rectangle using the provided painter and palette.
The text is drawn using the painter's pen, and aligned and wrapped according to the specified alignment. If an explicit textRole is specified, the text is drawn using the palette's color for the given role. The enabled parameter indicates whether or not the item is enabled; when reimplementing this function, the enabled parameter should influence how the item is drawn.
See also Qt::Alignment and drawItemPixmap().
Upstream PySide2 reference signatures (binding differences may apply):
drawItemText(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRect, flags: int, pal: PySide2.QtGui.QPalette, enabled: bool, text: str, textRole: PySide2.QtGui.QPalette.ColorRole=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#drawItemText
drawPrimitive
drawPrimitive(pe: Any, opt: Any, p: Any, w: Any) -> None
X.drawPrimitive(pe, opt, p, w)
Supplemental documentation: Qt 5 reference:
[pure virtual] void QStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget \= nullptr) const
Draws the given primitive element with the provided painter using the style options specified by option.
The widget argument is optional and may contain a widget that may aid in drawing the primitive element.
The table below is listing the primitive elements and their associated style option subclasses. The style options contain all the parameters required to draw the elements, including QStyleOption::state which holds the style flags that are used when drawing. The table also describes which flags that are set when casting the given option to the appropriate subclass.
Note that if a primitive element is not listed here, it is because it uses a plain QStyleOption object.
| Primitive Element | QStyleOption Subclass | Style Flag | Remark |
|---|---|---|---|
| PE_FrameFocusRect | QStyleOptionFocusRect | State_FocusAtBorder | Whether the focus is is at the border or inside the widget. |
| PE_IndicatorCheckBox | QStyleOptionButton | State_NoChange | Indicates a "tri-state" checkbox. |
| State_On | Indicates the indicator is checked. | ||
| PE_IndicatorRadioButton | QStyleOptionButton | State_On | Indicates that a radio button is selected. |
| State_NoChange | Indicates a "tri-state" controller. | ||
| State_Enabled | Indicates the controller is enabled. | ||
| PE_IndicatorBranch | QStyleOption | State_Children | Indicates that the control for expanding the tree to show child items, should be drawn. |
| State_Item | Indicates that a horizontal branch (to show a child item), should be drawn. | ||
| State_Open | Indicates that the tree branch is expanded. | ||
| State_Sibling | Indicates that a vertical line (to show a sibling item), should be drawn. | ||
| PE_IndicatorHeaderArrow | QStyleOptionHeader | State_UpArrow | Indicates that the arrow should be drawn up; otherwise it should be down. |
| PE_FrameGroupBox, PE_Frame, PE_FrameLineEdit, PE_FrameMenu, PE_FrameDockWidget, PE_FrameWindow | QStyleOptionFrame | State_Sunken | Indicates that the Frame should be sunken. |
| PE_IndicatorToolBarHandle | QStyleOption | State_Horizontal | Indicates that the window handle is horizontal instead of vertical. |
| PE_IndicatorSpinPlus, PE_IndicatorSpinMinus, PE_IndicatorSpinUp, PE_IndicatorSpinDown, | QStyleOptionSpinBox | State_Sunken | Indicates that the button is pressed. |
| PE_PanelButtonCommand | QStyleOptionButton | State_Enabled | Set if the button is enabled. |
| State_HasFocus | Set if the button has input focus. | ||
| State_Raised | Set if the button is not down, not on and not flat. | ||
| State_On | Set if the button is a toggle button and is toggled on. | ||
| State_Sunken | Set if the button is down (i.e., the mouse button or the space bar is pressed on the button). |
See also drawComplexControl() and drawControl().
Upstream PySide2 reference signatures (binding differences may apply):
drawPrimitive(self, pe: PySide2.QtWidgets.QStyle.PrimitiveElement, opt: PySide2.QtWidgets.QStyleOption, p: PySide2.QtGui.QPainter, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#drawPrimitive
generatedIconPixmap
generatedIconPixmap(iconMode: Any, pixmap: Any, opt: Any) -> Any
X.generatedIconPixmap(iconMode, pixmap, opt) -> PythonQt.QtGui.QPixmap
Supplemental documentation: Qt 5 reference:
[pure virtual] QPixmap QStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap \&pixmap, const QStyleOption *option) const
Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option.
The option parameter can pass extra information, but it must contain a palette.
Note that not all pixmaps will conform, in which case the returned pixmap is a plain copy.
See also QIcon.
Upstream PySide2 reference signatures (binding differences may apply):
generatedIconPixmap(self, iconMode: PySide2.QtGui.QIcon.Mode, pixmap: PySide2.QtGui.QPixmap, opt: PySide2.QtWidgets.QStyleOption) -> PySide2.QtGui.QPixmap
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#generatedIconPixmap
hitTestComplexControl
hitTestComplexControl(cc: Any, opt: Any, pt: Any, widget: Any) -> Any
X.hitTestComplexControl(cc, opt, pt, widget)
Supplemental documentation: Qt 5 reference:
[pure virtual] QStyle::SubControl QStyle::hitTestComplexControl(QStyle::ComplexControl control, const QStyleOptionComplex *option, const QPoint \&position, const QWidget *widget \= nullptr) const
Returns the sub control at the given position in the given complex control (with the style options specified by option).
Note that the position is expressed in screen coordinates.
The option argument is a pointer to a QStyleOptionComplex object (or one of its subclasses). The object can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget argument is optional and can contain additional information for the function.
See also drawComplexControl() and subControlRect().
Upstream PySide2 reference signatures (binding differences may apply):
hitTestComplexControl(self, cc: PySide2.QtWidgets.QStyle.ComplexControl, opt: PySide2.QtWidgets.QStyleOptionComplex, pt: PySide2.QtCore.QPoint, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtWidgets.QStyle.SubControl
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#hitTestComplexControl
itemPixmapRect
itemPixmapRect(r: Any, arg1: flags, pixmap: Any) -> Any
X.itemPixmapRect(r, flags, pixmap) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[virtual] QRect QStyle::itemPixmapRect(const QRect \&rectangle, int alignment, const QPixmap \&pixmap) const
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.
Upstream PySide2 reference signatures (binding differences may apply):
itemPixmapRect(self, r: PySide2.QtCore.QRect, flags: int, pixmap: PySide2.QtGui.QPixmap) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#itemPixmapRect
layoutSpacing
layoutSpacing(control1: Any, control2: Any, orientation: Any, option: Any, widget: Any) -> int
X.layoutSpacing(control1, control2, orientation, option, widget) -> int
Supplemental documentation: Qt 5 reference:
[pure virtual] int QStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option \= nullptr, const QWidget *widget \= nullptr) const
Returns the spacing that should be used between control1 and control2 in a layout.
orientation specifies whether the controls are laid out side by side or stacked
vertically. The option parameter can be used to pass extra information about the
parent widget. The widget parameter is optional and can also be used if option is
nullptr.
This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
This function was introduced in Qt 4.3.
See also combinedLayoutSpacing().
Upstream PySide2 reference signatures (binding differences may apply):
layoutSpacing(self, control1: PySide2.QtWidgets.QSizePolicy.ControlType, control2: PySide2.QtWidgets.QSizePolicy.ControlType, orientation: PySide2.QtCore.Qt.Orientation, option: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#layoutSpacing
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtGui.QStyle.objectNameChanged; argument details are not documented.
pixelMetric
pixelMetric(metric: Any, option: Any, widget: Any) -> int
X.pixelMetric(metric, option, widget) -> int
Supplemental documentation: Qt 5 reference:
[pure virtual] int QStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption *option \= nullptr, const QWidget *widget \= nullptr) const
Returns the value of the given pixel metric.
The specified option and widget can be used for calculating the metric. In general, the widget argument is not used. The option can be cast to the appropriate type using the qstyleoption_cast() function. Note that the option may be zero even for PixelMetrics that can make use of it. See the table below for the appropriate option casts:
Some pixel metrics are called from widgets and some are only called internally by the style. If the metric is not called by a widget, it is the discretion of the style author to make use of it. For some styles, this may not be appropriate.
Upstream PySide2 reference signatures (binding differences may apply):
pixelMetric(self, metric: PySide2.QtWidgets.QStyle.PixelMetric, option: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#pixelMetric
polish
polish(application: Any) -> None
X.polish(application)
Supplemental documentation: Qt 5 reference:
[virtual] void QStyle::polish(QWidget *widget)
Initializes the appearance of the given widget.
This function is called for every widget at some point after it has been fully created but just before it is shown for the very first time.
Note that the default implementation does nothing. Reasonable actions in this function might be to call the QWidget::setBackgroundMode() function for the widget. Do not use the function to set, for example, the geometry. Reimplementing this function provides a back-door through which the appearance of a widget can be changed, but with Qt's style engine it is rarely necessary to implement this function; reimplement drawItemPixmap(), drawItemText(), drawPrimitive(), etc. instead.
The QWidget::inherits() function may provide enough information to allow class-specific customizations. But because new QStyle subclasses are expected to work reasonably with all current and future widgets, limited use of hard-coded customization is recommended.
See also unpolish().
[virtual] void QStyle::polish(QApplication *application)
This is an overloaded function.
Late initialization of the given application object.
[virtual] void QStyle::polish(QPalette \&palette)
This is an overloaded function.
Changes the palette according to style specific requirements for color palettes (if any).
See also QPalette and QApplication::setPalette().
Upstream PySide2 reference signatures (binding differences may apply):
polish(self, application: PySide2.QtWidgets.QApplication) -> None
polish(self, palette: PySide2.QtGui.QPalette) -> None
polish(self, widget: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#polish
proxy
proxy() -> Any
X.proxy() -> PythonQt.QtGui.QStyle
Supplemental documentation: Qt 5 reference:
const QStyle *QStyle::proxy() const
This function returns the current proxy for this style. By default most styles will return themselves. However when a proxy style is in use, it will allow the style to call back into its proxy.
This function was introduced in Qt 4.6.
Upstream PySide2 reference signatures (binding differences may apply):
proxy(self) -> PySide2.QtWidgets.QStyle
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#proxy
sizeFromContents
sizeFromContents(ct: Any, opt: Any, contentsSize: Any, w: Any) -> Any
X.sizeFromContents(ct, opt, contentsSize, w) -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
[pure virtual] QSize QStyle::sizeFromContents(QStyle::ContentsType type, const QStyleOption *option, const QSize \&contentsSize, const QWidget *widget \= nullptr) const
Returns the size of the element described by the specified option and type, based on the provided contentsSize.
The option argument is a pointer to a QStyleOption or one of its subclasses. The option can be cast to the appropriate type using the qstyleoption_cast() function. The widget is an optional argument and can contain extra information used for calculating the size.
See the table below for the appropriate option casts:
See also ContentsType and QStyleOption.
Upstream PySide2 reference signatures (binding differences may apply):
sizeFromContents(self, ct: PySide2.QtWidgets.QStyle.ContentsType, opt: PySide2.QtWidgets.QStyleOption, contentsSize: PySide2.QtCore.QSize, w: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#sizeFromContents
sliderPositionFromValue
sliderPositionFromValue(min: int, max: int, val: int, space: int, upsideDown: bool) -> int
X.sliderPositionFromValue(min, max, val, space, upsideDown) -> int
Supplemental documentation: Qt 5 reference:
[static] int QStyle::sliderPositionFromValue(int min, int max, int logicalValue, int span, bool upsideDown \= false)
Converts the given logicalValue to a pixel position. The min parameter maps to 0, max maps to span and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow, providing that span is less than 4096.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
See also sliderValueFromPosition().
Upstream PySide2 reference signatures (binding differences may apply):
sliderPositionFromValue(min: int, max: int, val: int, space: int, upsideDown: bool=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#sliderPositionFromValue
sliderValueFromPosition
sliderValueFromPosition(min: int, max: int, pos: int, space: int, upsideDown: bool) -> int
X.sliderValueFromPosition(min, max, pos, space, upsideDown) -> int
Supplemental documentation: Qt 5 reference:
[static] int QStyle::sliderValueFromPosition(int min, int max, int position, int span, bool upsideDown \= false)
Converts the given pixel position to a logical value. 0 maps to the min parameter, span maps to max and other values are distributed evenly in-between.
This function can handle the entire integer range without overflow.
By default, this function assumes that the maximum value is on the right for horizontal items and on the bottom for vertical items. Set the upsideDown parameter to true to reverse this behavior.
See also sliderPositionFromValue().
Upstream PySide2 reference signatures (binding differences may apply):
sliderValueFromPosition(min: int, max: int, pos: int, space: int, upsideDown: bool=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#sliderValueFromPosition
standardIcon
standardIcon(standardIcon: Any, option: Any, widget: Any) -> Any
X.standardIcon(standardIcon, option, widget) -> PythonQt.QtGui.QIcon
Supplemental documentation: Qt 5 reference:
[pure virtual] QIcon QStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption *option \= 0, const QWidget *widget \= 0) const
Returns an icon for the given standardIcon.
The standardIcon is a standard pixmap which can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate icon. The widget argument is optional and can also be used to aid the determination of the icon.
This function was introduced in Qt 4.1.
Upstream PySide2 reference signatures (binding differences may apply):
standardIcon(self, standardIcon: PySide2.QtWidgets.QStyle.StandardPixmap, option: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtGui.QIcon
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#standardIcon
standardPalette
standardPalette() -> Any
X.standardPalette() -> PythonQt.QtGui.QPalette
Supplemental documentation: Qt 5 reference:
[virtual] QPalette QStyle::standardPalette() const
Returns the style's standard palette.
Note that on systems that support system colors, the style's standard palette is not used. In particular, the Windows Vista and Mac styles do not use the standard palette, but make use of native theme engines. With these styles, you should not set the palette with QApplication::setPalette().
See also QApplication::setPalette().
Upstream PySide2 reference signatures (binding differences may apply):
standardPalette(self) -> PySide2.QtGui.QPalette
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#standardPalette
standardPixmap
standardPixmap(standardPixmap: Any, opt: Any, widget: Any) -> Any
X.standardPixmap(standardPixmap, opt, widget) -> PythonQt.QtGui.QPixmap
Upstream PySide2 reference signatures (binding differences may apply):
standardPixmap(self, standardPixmap: PySide2.QtWidgets.QStyle.StandardPixmap, opt: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtGui.QPixmap
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#standardPixmap
styleHint
styleHint(stylehint: Any, opt: Any, widget: Any, returnData: Any) -> int
X.styleHint(stylehint, opt, widget, returnData) -> int
Supplemental documentation: Qt 5 reference:
[pure virtual] int QStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option \= nullptr, const QWidget *widget \= nullptr, QStyleHintReturn *returnData \= nullptr) const
Returns an integer representing the specified style hint for the given widget described by the provided style option.
returnData is used when the querying widget needs more detailed data than the integer that styleHint() returns. See the QStyleHintReturn class description for details.
Upstream PySide2 reference signatures (binding differences may apply):
styleHint(self, stylehint: PySide2.QtWidgets.QStyle.StyleHint, opt: typing.Optional[PySide2.QtWidgets.QStyleOption]=..., widget: typing.Optional[PySide2.QtWidgets.QWidget]=..., returnData: typing.Optional[PySide2.QtWidgets.QStyleHintReturn]=...) -> int
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#styleHint
subControlRect
subControlRect(cc: Any, opt: Any, sc: Any, widget: Any) -> Any
X.subControlRect(cc, opt, sc, widget) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[pure virtual] QRect QStyle::subControlRect(QStyle::ComplexControl control, const QStyleOptionComplex *option, QStyle::SubControl subControl, const QWidget *widget \= nullptr) const
Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). The rectangle is defined in screen coordinates.
The option argument is a pointer to QStyleOptionComplex or one of its subclasses, and can be cast to the appropriate type using the qstyleoption_cast() function. See drawComplexControl() for details. The widget is optional and can contain additional information for the function.
See also drawComplexControl().
Upstream PySide2 reference signatures (binding differences may apply):
subControlRect(self, cc: PySide2.QtWidgets.QStyle.ComplexControl, opt: PySide2.QtWidgets.QStyleOptionComplex, sc: PySide2.QtWidgets.QStyle.SubControl, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#subControlRect
subElementRect
subElementRect(subElement: Any, option: Any, widget: Any) -> Any
X.subElementRect(subElement, option, widget) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[pure virtual] QRect QStyle::subElementRect(QStyle::SubElement element, const QStyleOption *option, const QWidget *widget \= nullptr) const
Returns the sub-area for the given element as described in the provided style option. The returned rectangle is defined in screen coordinates.
The widget argument is optional and can be used to aid determining the area. The QStyleOption object can be cast to the appropriate type using the qstyleoption_cast() function. See the table below for the appropriate option casts:
Upstream PySide2 reference signatures (binding differences may apply):
subElementRect(self, subElement: PySide2.QtWidgets.QStyle.SubElement, option: PySide2.QtWidgets.QStyleOption, widget: typing.Optional[PySide2.QtWidgets.QWidget]=...) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#subElementRect
unpolish
unpolish(application: Any) -> None
X.unpolish(application)
Supplemental documentation: Qt 5 reference:
[virtual] void QStyle::unpolish(QWidget *widget)
Uninitialize the given widget's appearance.
This function is the counterpart to polish(). It is called for every polished widget whenever the style is dynamically changed; the former style has to unpolish its settings before the new style can polish them again.
Note that unpolish() will only be called if the widget is destroyed. This can cause problems in some cases, e.g, if you remove a widget from the UI, cache it, and then reinsert it after the style has changed; some of Qt's classes cache their widgets.
See also polish().
[virtual] void QStyle::unpolish(QApplication *application)
This is an overloaded function.
Uninitialize the given application.
Upstream PySide2 reference signatures (binding differences may apply):
unpolish(self, application: PySide2.QtWidgets.QApplication) -> None
unpolish(self, widget: PySide2.QtWidgets.QWidget) -> None
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#unpolish
visualAlignment
visualAlignment(direction: Any, alignment: Any) -> Any
X.visualAlignment(direction, alignment)
Supplemental documentation: Qt 5 reference:
[static] Qt::Alignment QStyle::visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment)
Transforms an alignment of Qt::AlignLeft or Qt::AlignRight without Qt::AlignAbsolute into Qt::AlignLeft or Qt::AlignRight with Qt::AlignAbsolute according to the layout direction. The other alignment flags are left untouched.
If no horizontal alignment was specified, the function returns the default alignment for the given layout direction.
Upstream PySide2 reference signatures (binding differences may apply):
visualAlignment(direction: PySide2.QtCore.Qt.LayoutDirection, alignment: PySide2.QtCore.Qt.Alignment) -> PySide2.QtCore.Qt.Alignment
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#visualAlignment
visualPos
visualPos(direction: Any, boundingRect: Any, logicalPos: Any) -> Any
X.visualPos(direction, boundingRect, logicalPos) -> PythonQt.QtCore.QPoint
Supplemental documentation: Qt 5 reference:
[static] QPoint QStyle::visualPos(Qt::LayoutDirection direction, const QRect \&boundingRectangle, const QPoint \&logicalPosition)
Returns the given logicalPosition converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.
See also QWidget::layoutDirection.
Upstream PySide2 reference signatures (binding differences may apply):
visualPos(direction: PySide2.QtCore.Qt.LayoutDirection, boundingRect: PySide2.QtCore.QRect, logicalPos: PySide2.QtCore.QPoint) -> PySide2.QtCore.QPoint
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#visualPos
visualRect
visualRect(direction: Any, boundingRect: Any, logicalRect: Any) -> Any
X.visualRect(direction, boundingRect, logicalRect) -> PythonQt.QtCore.QRect
Supplemental documentation: Qt 5 reference:
[static] QRect QStyle::visualRect(Qt::LayoutDirection direction, const QRect \&boundingRectangle, const QRect \&logicalRectangle)
Returns the given logicalRectangle converted to screen coordinates based on the specified direction. The boundingRectangle is used when performing the translation.
This function is provided to support right-to-left desktops, and is typically used in implementations of the subControlRect() function.
See also QWidget::layoutDirection.
Upstream PySide2 reference signatures (binding differences may apply):
visualRect(direction: PySide2.QtCore.Qt.LayoutDirection, boundingRect: PySide2.QtCore.QRect, logicalRect: PySide2.QtCore.QRect) -> PySide2.QtCore.QRect
Source: https://doc.qt.io/archives/qt-5.15/qstyle.html#visualRect