Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI. More...
#include <qstyle.h>
Public Member Functions | |
QStyle () | |
Constructs a style object. | |
virtual | ~QStyle () |
Destroys the style object. | |
QString | name () const |
Returns the name of the style. | |
virtual void | polish (QWidget *widget) |
Initializes the appearance of the given widget. | |
virtual void | unpolish (QWidget *widget) |
Uninitialize the given {widget}'s appearance. | |
virtual void | polish (QApplication *application) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Late initialization of the given application object. | |
virtual void | unpolish (QApplication *application) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Uninitialize the given application. | |
virtual void | polish (QPalette &palette) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Changes the palette according to style specific requirements for color palettes (if any). | |
virtual QRect | itemTextRect (const QFontMetrics &fm, const QRect &r, int flags, bool enabled, const QString &text) const |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment. | |
virtual QRect | itemPixmapRect (const QRect &r, int flags, const QPixmap &pixmap) const |
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment. | |
virtual void | drawItemText (QPainter *painter, const QRect &rect, int flags, const QPalette &pal, 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. | |
virtual void | drawItemPixmap (QPainter *painter, const QRect &rect, int alignment, const QPixmap &pixmap) const |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter. | |
virtual QPalette | standardPalette () const |
Returns the style's standard palette. | |
virtual void | drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const =0 |
Draws the given primitive element with the provided painter using the style options specified by option. | |
virtual void | drawControl (ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const =0 |
Draws the given element with the provided painter with the style options specified by option. | |
virtual QRect | subElementRect (SubElement subElement, const QStyleOption *option, const QWidget *widget=nullptr) const =0 |
Returns the sub-area for the given element as described in the provided style option. | |
virtual void | drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget=nullptr) const =0 |
Draws the given control using the provided painter with the style options specified by option. | |
virtual SubControl | hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=nullptr) const =0 |
Returns the sub control at the given position in the given complex control (with the style options specified by option). | |
virtual QRect | subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=nullptr) const =0 |
Returns the rectangle containing the specified subControl of the given complex control (with the style specified by option). | |
virtual int | pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0 |
Returns the value of the given pixel metric. | |
virtual QSize | sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const =0 |
Returns the size of the element described by the specified option and type, based on the provided contentsSize. | |
virtual int | styleHint (StyleHint stylehint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const =0 |
Returns an integer representing the specified style hint for the given widget described by the provided style option. | |
virtual QPixmap | standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr) const =0 |
virtual QIcon | standardIcon (StandardPixmap standardIcon, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0 |
virtual QPixmap | generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const =0 |
Returns a copy of the given pixmap, styled to conform to the specified iconMode and taking into account the palette specified by option. | |
virtual int | layoutSpacing (QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0 |
int | combinedLayoutSpacing (QSizePolicy::ControlTypes controls1, QSizePolicy::ControlTypes controls2, Qt::Orientation orientation, QStyleOption *option=nullptr, QWidget *widget=nullptr) const |
const QStyle * | proxy () const |
Public Member Functions inherited from QObject | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
bool | moveToThread (QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL) |
Changes the thread affinity for this object and its children and returns true on success. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::nanoseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
void | killTimer (Qt::TimerId id) |
template<typename T > | |
T | findChild (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (QAnyStringView aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
T | findChild (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
Static Public Member Functions | |
static QRect | visualRect (Qt::LayoutDirection direction, const QRect &boundingRect, const QRect &logicalRect) |
Returns the given logicalRectangle converted to screen coordinates based on the specified direction. | |
static QPoint | visualPos (Qt::LayoutDirection direction, const QRect &boundingRect, const QPoint &logicalPos) |
Returns the given logicalPosition converted to screen coordinates based on the specified direction. | |
static int | sliderPositionFromValue (int min, int max, int val, int space, bool upsideDown=false) |
Converts the given logicalValue to a pixel position. | |
static int | sliderValueFromPosition (int min, int max, int pos, int space, bool upsideDown=false) |
Converts the given pixel position to a logical value. | |
static Qt::Alignment | 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. | |
static QRect | 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. | |
Static Public Member Functions inherited from QObject | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
Protected Member Functions | |
QStyle (QStylePrivate &dd) | |
Protected Member Functions inherited from QObject | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Friends | |
class | QWidget |
class | QWidgetPrivate |
class | QApplication |
class | QProxyStyle |
class | QProxyStylePrivate |
class | QStyleFactory |
class | QStyleSheetProxySaver |
Additional Inherited Members | |
Public Slots inherited from QObject | |
void | deleteLater () |
\threadsafe | |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Protected Attributes inherited from QObject | |
QScopedPointer< QObjectData > | d_ptr |
Properties inherited from QObject | |
QString | objectName |
the name of this object | |
Related Symbols inherited from QObject | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
\inmodule QtWidgets
Qt contains a set of QStyle subclasses that emulate the styles of the different platforms supported by Qt (QWindowsStyle, QMacStyle etc.). By default, these styles are built into the Qt GUI module. Styles can also be made available as plugins.
Qt's built-in widgets use QStyle to perform nearly all of their drawing, ensuring that they look exactly like the equivalent native widgets. The diagram below shows a QComboBox in nine different styles.
Nine combo boxes
Topics:
This enum describes the available complex controls.
Complex controls have different behavior depending upon where the user clicks on them or which keys are pressed.
\value CC_SpinBox A spinbox, like QSpinBox. \value CC_ComboBox A combobox, like QComboBox. \value CC_ScrollBar A scroll bar, like QScrollBar. \value CC_Slider A slider, like QSlider. \value CC_ToolButton A tool button, like QToolButton. \value CC_TitleBar A Title bar, like those used in QMdiSubWindow. \value CC_GroupBox A group box, like QGroupBox. \value CC_Dial A dial, like QDial. \value CC_MdiControls The minimize, close, and normal button in the menu bar for a maximized MDI subwindow.
\value CC_CustomBase Base value for custom complex controls. Custom values must be greater than this value.
Enumerator | |
---|---|
CC_SpinBox | |
CC_ComboBox | |
CC_ScrollBar | |
CC_Slider | |
CC_ToolButton | |
CC_TitleBar | |
CC_Dial | |
CC_GroupBox | |
CC_MdiControls | |
CC_CustomBase |
enum QStyle::ContentsType |
This enum describes the available contents types.
These are used to calculate sizes for the contents of various widgets.
\value CT_CheckBox A check box, like QCheckBox. \value CT_ComboBox A combo box, like QComboBox. \omitvalue CT_DialogButtons \value CT_HeaderSection A header section, like QHeader. \value CT_LineEdit A line edit, like QLineEdit. \value CT_Menu A menu, like QMenu. \value CT_MenuBar A menu bar, like QMenuBar. \value CT_MenuBarItem A menu bar item, like the buttons in a QMenuBar. \value CT_MenuItem A menu item, like QMenuItem. \value CT_ProgressBar A progress bar, like QProgressBar. \value CT_PushButton A push button, like QPushButton. \value CT_RadioButton A radio button, like QRadioButton. \value CT_SizeGrip A size grip, like QSizeGrip. \value CT_Slider A slider, like QSlider. \value CT_ScrollBar A scroll bar, like QScrollBar. \value CT_SpinBox A spin box, like QSpinBox. \value CT_Splitter A splitter, like QSplitter. \value CT_TabBarTab A tab on a tab bar, like QTabBar. \value CT_TabWidget A tab widget, like QTabWidget. \value CT_ToolButton A tool button, like QToolButton. \value CT_GroupBox A group box, like QGroupBox. \value CT_ItemViewItem An item inside an item view.
\value CT_CustomBase Base value for custom contents types. Custom values must be greater than this value.
\value CT_MdiControls The minimize, normal, and close button in the menu bar for a maximized MDI subwindow.
This enum represents a control element.
A control element is a part of a widget that performs some action or displays information to the user.
\value CE_PushButton A QPushButton, draws CE_PushButtonBevel, CE_PushButtonLabel and PE_FrameFocusRect. \value CE_PushButtonBevel The bevel and default indicator of a QPushButton. \value CE_PushButtonLabel The label (an icon with text or pixmap) of a QPushButton.
\value CE_DockWidgetTitle Dock window title. \value CE_Splitter Splitter handle; see also QSplitter.
\value CE_CheckBox A QCheckBox, draws a PE_IndicatorCheckBox, a CE_CheckBoxLabel and a PE_FrameFocusRect. \value CE_CheckBoxLabel The label (text or pixmap) of a QCheckBox.
\value CE_RadioButton A QRadioButton, draws a PE_IndicatorRadioButton, a CE_RadioButtonLabel and a PE_FrameFocusRect. \value CE_RadioButtonLabel The label (text or pixmap) of a QRadioButton.
\value CE_TabBarTab The tab and label within a QTabBar. \value CE_TabBarTabShape The tab shape within a tab bar. \value CE_TabBarTabLabel The label within a tab.
\value CE_ProgressBar A QProgressBar, draws CE_ProgressBarGroove, CE_ProgressBarContents and CE_ProgressBarLabel. \value CE_ProgressBarGroove The groove where the progress indicator is drawn in a QProgressBar. \value CE_ProgressBarContents The progress indicator of a QProgressBar. \value CE_ProgressBarLabel The text label of a QProgressBar.
\value CE_ToolButtonLabel A tool button's label.
\value CE_MenuBarItem A menu item in a QMenuBar. \value CE_MenuBarEmptyArea The empty area of a QMenuBar.
\value CE_MenuItem A menu item in a QMenu. \value CE_MenuScroller Scrolling areas in a QMenu when the style supports scrolling. \value CE_MenuTearoff A menu item representing the tear off section of a QMenu. \value CE_MenuEmptyArea The area in a menu without menu items. \value CE_MenuHMargin The horizontal extra space on the left/right of a menu. \value CE_MenuVMargin The vertical extra space on the top/bottom of a menu.
\value CE_ToolBoxTab The toolbox's tab and label within a QToolBox. \value CE_SizeGrip Window resize handle; see also QSizeGrip.
\value CE_Header A header. \value CE_HeaderSection A header section. \value CE_HeaderLabel The header's label.
\value CE_ScrollBarAddLine Scroll bar line increase indicator. (i.e., scroll down); see also QScrollBar. \value CE_ScrollBarSubLine Scroll bar line decrease indicator (i.e., scroll up). \value CE_ScrollBarAddPage Scolllbar page increase indicator (i.e., page down). \value CE_ScrollBarSubPage Scroll bar page decrease indicator (i.e., page up). \value CE_ScrollBarSlider Scroll bar slider. \value CE_ScrollBarFirst Scroll bar first line indicator (i.e., home). \value CE_ScrollBarLast Scroll bar last line indicator (i.e., end).
\value CE_RubberBand Rubber band used in for example an icon view.
\value CE_FocusFrame Focus frame that is style controlled.
\value CE_ItemViewItem An item inside an item view.
\value CE_CustomBase Base value for custom control elements; custom values must be greater than this value. \value CE_ComboBoxLabel The label of a non-editable QComboBox. \value CE_ToolBar A toolbar like QToolBar. \value CE_ToolBoxTabShape The toolbox's tab shape. \value CE_ToolBoxTabLabel The toolbox's tab label. \value CE_HeaderEmptyArea The area of a header view where there are no header sections.
\value CE_ShapedFrame The frame with the shape specified in the QStyleOptionFrame; see QFrame.
\omitvalue CE_ColumnViewGrip
enum QStyle::PixelMetric |
This enum describes the various available pixel metrics.
A pixel metric is a style dependent size represented by a single pixel value.
\value PM_ButtonMargin Amount of whitespace between push button labels and the frame. \value PM_DockWidgetTitleBarButtonMargin Amount of whitespace between dock widget's title bar button labels and the frame. \value PM_ButtonDefaultIndicator Width of the default-button indicator frame. \value PM_MenuButtonIndicator Width of the menu button indicator proportional to the widget height. \value PM_ButtonShiftHorizontal Horizontal contents shift of a button when the button is down. \value PM_ButtonShiftVertical Vertical contents shift of a button when the button is down.
\value PM_DefaultFrameWidth Default frame width (usually 2). \value PM_SpinBoxFrameWidth Frame width of a spin box, defaults to PM_DefaultFrameWidth. \value PM_ComboBoxFrameWidth Frame width of a combo box, defaults to PM_DefaultFrameWidth.
\value PM_MdiSubWindowFrameWidth Frame width of an MDI window. \value PM_MdiSubWindowMinimizedWidth Width of a minimized MDI window.
\value PM_LayoutLeftMargin Default \l{QLayout::setContentsMargins()}{left margin} for a QLayout. \value PM_LayoutTopMargin Default \l{QLayout::setContentsMargins()}{top margin} for a QLayout. \value PM_LayoutRightMargin Default \l{QLayout::setContentsMargins()}{right margin} for a QLayout. \value PM_LayoutBottomMargin Default \l{QLayout::setContentsMargins()}{bottom margin} for a QLayout. \value PM_LayoutHorizontalSpacing Default \l{QLayout::spacing}{horizontal spacing} for a QLayout. \value PM_LayoutVerticalSpacing Default \l{QLayout::spacing}{vertical spacing} for a QLayout.
\value PM_MaximumDragDistance The maximum allowed distance between the mouse and a scrollbar when dragging. Exceeding the specified distance will cause the slider to jump back to the original position; a value of -1 disables this behavior.
\value PM_ScrollBarExtent Width of a vertical scroll bar and the height of a horizontal scroll bar. \value PM_ScrollBarSliderMin The minimum height of a vertical scroll bar's slider and the minimum width of a horizontal scroll bar's slider.
\value PM_SliderThickness Total slider thickness. \value PM_SliderControlThickness Thickness of the slider handle. \value PM_SliderLength Length of the slider. \value PM_SliderTickmarkOffset The offset between the tickmarks and the slider. \value PM_SliderSpaceAvailable The available space for the slider to move.
\value PM_DockWidgetSeparatorExtent Width of a separator in a horizontal dock window and the height of a separator in a vertical dock window. \value PM_DockWidgetHandleExtent Width of the handle in a horizontal dock window and the height of the handle in a vertical dock window. \value PM_DockWidgetFrameWidth Frame width of a dock window. \value PM_DockWidgetTitleMargin Margin of the dock window title.
\value PM_MenuBarPanelWidth Frame width of a menu bar, defaults to PM_DefaultFrameWidth. \value PM_MenuBarItemSpacing Spacing between menu bar items. \value PM_MenuBarHMargin Spacing between menu bar items and left/right of bar. \value PM_MenuBarVMargin Spacing between menu bar items and top/bottom of bar.
\value PM_ToolBarFrameWidth Width of the frame around toolbars. \value PM_ToolBarHandleExtent Width of a toolbar handle in a horizontal toolbar and the height of the handle in a vertical toolbar. \value PM_ToolBarItemMargin Spacing between the toolbar frame and the items. \value PM_ToolBarItemSpacing Spacing between toolbar items. \value PM_ToolBarSeparatorExtent Width of a toolbar separator in a horizontal toolbar and the height of a separator in a vertical toolbar. \value PM_ToolBarExtensionExtent Width of a toolbar extension button in a horizontal toolbar and the height of the button in a vertical toolbar.
\value PM_TabBarTabOverlap Number of pixels the tabs should overlap. (Currently only used in styles, not inside of QTabBar) \value PM_TabBarTabHSpace Extra space added to the tab width. \value PM_TabBarTabVSpace Extra space added to the tab height. \value PM_TabBarBaseHeight Height of the area between the tab bar and the tab pages. \value PM_TabBarBaseOverlap Number of pixels the tab bar overlaps the tab bar base. \value PM_TabBarScrollButtonWidth \value PM_TabBarTabShiftHorizontal Horizontal pixel shift when a tab is selected. \value PM_TabBarTabShiftVertical Vertical pixel shift when a tab is selected.
\value PM_ProgressBarChunkWidth Width of a chunk in a progress bar indicator.
\value PM_SplitterWidth Width of a splitter.
\value PM_TitleBarHeight Height of the title bar.
\value PM_IndicatorWidth Width of a check box indicator. \value PM_IndicatorHeight Height of a checkbox indicator. \value PM_ExclusiveIndicatorWidth Width of a radio button indicator. \value PM_ExclusiveIndicatorHeight Height of a radio button indicator.
\value PM_MenuPanelWidth Border width (applied on all sides) for a QMenu. \value PM_MenuHMargin Additional border (used on left and right) for a QMenu. \value PM_MenuVMargin Additional border (used for bottom and top) for a QMenu. \value PM_MenuScrollerHeight Height of the scroller area in a QMenu. \value PM_MenuTearoffHeight Height of a tear off area in a QMenu. \value PM_MenuDesktopFrameWidth The frame width for the menu on the desktop.
\omitvalue PM_DialogButtonsSeparator \omitvalue PM_DialogButtonsButtonWidth \omitvalue PM_DialogButtonsButtonHeight
\value PM_HeaderMarkSize The size of the sort indicator in a header. \value PM_HeaderGripMargin The size of the resize grip in a header. \value PM_HeaderMargin The size of the margin between the sort indicator and the text. \value PM_SpinBoxSliderHeight The height of the optional spin box slider.
\value PM_ToolBarIconSize Default tool bar icon size \value PM_SmallIconSize Default small icon size \value PM_LargeIconSize Default large icon size
\value PM_FocusFrameHMargin Horizontal margin that the focus frame will outset the widget by. \value PM_FocusFrameVMargin Vertical margin that the focus frame will outset the widget by. \value PM_IconViewIconSize The default size for icons in an icon view. \value PM_ListViewIconSize The default size for icons in a list view.
\value PM_ToolTipLabelFrameWidth The frame width for a tool tip label. \value PM_CheckBoxLabelSpacing The spacing between a check box indicator and its label. \value PM_RadioButtonLabelSpacing The spacing between a radio button indicator and its label. \value PM_TabBarIconSize The default icon size for a tab bar. \value PM_SizeGripSize The size of a size grip. \value PM_MessageBoxIconSize The size of the standard icons in a message box \value PM_ButtonIconSize The default size of button icons \value PM_TextCursorWidth The width of the cursor in a line edit or text edit \value PM_TabBar_ScrollButtonOverlap The distance between the left and right buttons in a tab bar.
\value PM_TabCloseIndicatorWidth The default width of a close button on a tab in a tab bar. \value PM_TabCloseIndicatorHeight The default height of a close button on a tab in a tab bar.
\value PM_ScrollView_ScrollBarSpacing Distance between frame and scrollbar with SH_ScrollView_FrameOnlyAroundContents set. \value PM_ScrollView_ScrollBarOverlap Overlap between scroll bars and scroll content
\value PM_SubMenuOverlap The horizontal overlap between a submenu and its parent.
\value [since 5.4] PM_TreeViewIndentation The indentation of items in a tree view.
\value PM_HeaderDefaultSectionSizeHorizontal The default size of sections in a horizontal header. This enum value has been introduced in Qt 5.5. \value PM_HeaderDefaultSectionSizeVertical The default size of sections in a vertical header. This enum value has been introduced in Qt 5.5.
\value [since 5.8] PM_TitleBarButtonIconSize The size of button icons on a title bar. \value [since 5.8] PM_TitleBarButtonSize The size of buttons on a title bar.
\value [since 6.2] PM_LineEditIconSize The default size for icons in a line edit.
\value [since 6.3] PM_LineEditIconMargin The margin around icons in a line edit.
\value PM_CustomBase Base value for custom pixel metrics. Custom values must be greater than this value.
This enum describes the various primitive elements.
A primitive element is a common GUI element, such as a checkbox indicator or button bevel.
\value PE_PanelButtonCommand Button used to initiate an action, for example, a QPushButton.
\value PE_FrameDefaultButton This frame around a default button, e.g. in a dialog. \value PE_PanelButtonBevel Generic panel with a button bevel. \value PE_PanelButtonTool Panel for a Tool button, used with QToolButton. \value PE_PanelLineEdit Panel for a QLineEdit. \value PE_IndicatorButtonDropDown Indicator for a drop down button, for example, a tool button that displays a menu.
\value PE_FrameFocusRect Generic focus indicator.
\value PE_IndicatorArrowUp Generic Up arrow. \value PE_IndicatorArrowDown Generic Down arrow. \value PE_IndicatorArrowRight Generic Right arrow. \value PE_IndicatorArrowLeft Generic Left arrow.
\value PE_IndicatorSpinUp Up symbol for a spin widget, for example a QSpinBox. \value PE_IndicatorSpinDown Down symbol for a spin widget. \value PE_IndicatorSpinPlus Increase symbol for a spin widget. \value PE_IndicatorSpinMinus Decrease symbol for a spin widget.
\value PE_IndicatorItemViewItemCheck On/off indicator for a view item.
\value PE_IndicatorCheckBox On/off indicator, for example, a QCheckBox. \value PE_IndicatorRadioButton Exclusive on/off indicator, for example, a QRadioButton.
\value PE_IndicatorDockWidgetResizeHandle Resize handle for dock windows.
\value PE_Frame Generic frame \value PE_FrameMenu Frame for popup windows/menus; see also QMenu. \value PE_PanelMenuBar Panel for menu bars. \value PE_PanelScrollAreaCorner Panel at the bottom-right (or bottom-left) corner of a scroll area.
\value PE_FrameDockWidget Panel frame for dock windows and toolbars. \value PE_FrameTabWidget Frame for tab widgets. \value PE_FrameLineEdit Panel frame for line edits. \value PE_FrameGroupBox Panel frame around group boxes. \value PE_FrameButtonBevel Panel frame for a button bevel. \value PE_FrameButtonTool Panel frame for a tool button.
\value PE_IndicatorHeaderArrow Arrow used to indicate sorting on a list or table header. \value PE_FrameStatusBarItem Frame for an item of a status bar; see also QStatusBar.
\value PE_FrameWindow Frame around a MDI window or a docking window.
\value PE_IndicatorMenuCheckMark Check mark used in a menu.
\value PE_IndicatorProgressChunk Section of a progress bar indicator; see also QProgressBar.
\value PE_IndicatorBranch Lines used to represent the branch of a tree in a tree view. \value PE_IndicatorToolBarHandle The handle of a toolbar. \value PE_IndicatorToolBarSeparator The separator in a toolbar. \value PE_PanelToolBar The panel for a toolbar. \value PE_PanelTipLabel The panel for a tip label. \value PE_FrameTabBarBase The frame that is drawn for a tab bar, usually drawn for a tab bar that isn't part of a tab widget. \value PE_IndicatorTabTear Deprecated. Use \l{PE_IndicatorTabTearLeft} instead. \value PE_IndicatorTabTearLeft An indicator that a tab is partially scrolled out on the left side of the visible tab bar when there are many tabs. \value PE_IndicatorTabTearRight An indicator that a tab is partially scrolled out on the right side of the visible tab bar when there are many tabs. \value PE_IndicatorColumnViewArrow An arrow in a QColumnView.
\value PE_Widget A plain QWidget.
\value PE_CustomBase Base value for custom primitive elements. All values above this are reserved for custom use. Custom values must be greater than this value.
\value PE_IndicatorItemViewItemDrop An indicator that is drawn to show where an item in an item view is about to be dropped during a drag-and-drop operation in an item view. \value PE_PanelItemViewItem The background for an item in an item view. \value PE_PanelItemViewRow The background of a row in an item view.
\value PE_PanelStatusBar The panel for a status bar.
\value PE_IndicatorTabClose The close button on a tab bar. \value PE_PanelMenu The panel for a menu.
This enum describes under what circumstances a software input panel will be requested by input capable widgets.
\value RSIP_OnMouseClickAndAlreadyFocused Requests an input panel if the user clicks on the widget, but only if it is already focused. \value RSIP_OnMouseClick Requests an input panel if the user clicks on the widget.
Enumerator | |
---|---|
RSIP_OnMouseClickAndAlreadyFocused | |
RSIP_OnMouseClick |
This enum describes the available standard pixmaps.
A standard pixmap is a pixmap that can follow some existing GUI style or guideline.
\value SP_TitleBarMinButton Minimize button on title bars (e.g., in QMdiSubWindow). \value SP_TitleBarMenuButton Menu button on a title bar. \value SP_TitleBarMaxButton Maximize button on title bars. \value SP_TitleBarCloseButton Close button on title bars. \value SP_TitleBarNormalButton Normal (restore) button on title bars. \value SP_TitleBarShadeButton Shade button on title bars. \value SP_TitleBarUnshadeButton Unshade button on title bars. \value SP_TitleBarContextHelpButton The Context help button on title bars. \value SP_MessageBoxInformation The "information" icon. \value SP_MessageBoxWarning The "warning" icon. \value SP_MessageBoxCritical The "critical" icon. \value SP_MessageBoxQuestion The "question" icon. \value SP_DesktopIcon The "desktop" icon. \value SP_TrashIcon The "trash" icon. \value SP_ComputerIcon The "My computer" icon. \value SP_DriveFDIcon The floppy icon. \value SP_DriveHDIcon The harddrive icon. \value SP_DriveCDIcon The CD icon. \value SP_DriveDVDIcon The DVD icon. \value SP_DriveNetIcon The network icon. \value SP_DirHomeIcon The home directory icon. \value SP_DirOpenIcon The open directory icon. \value SP_DirClosedIcon The closed directory icon. \value SP_DirIcon The directory icon. \value SP_DirLinkIcon The link to directory icon. \value SP_DirLinkOpenIcon The link to open directory icon. \value SP_FileIcon The file icon. \value SP_FileLinkIcon The link to file icon. \value SP_FileDialogStart The "start" icon in a file dialog. \value SP_FileDialogEnd The "end" icon in a file dialog. \value SP_FileDialogToParent The "parent directory" icon in a file dialog. \value SP_FileDialogNewFolder The "create new folder" icon in a file dialog. \value SP_FileDialogDetailedView The detailed view icon in a file dialog. \value SP_FileDialogInfoView The file info icon in a file dialog. \value SP_FileDialogContentsView The contents view icon in a file dialog. \value SP_FileDialogListView The list view icon in a file dialog. \value SP_FileDialogBack The back arrow in a file dialog. \value SP_DockWidgetCloseButton Close button on dock windows (see also QDockWidget). \value SP_ToolBarHorizontalExtensionButton Extension button for horizontal toolbars. \value SP_ToolBarVerticalExtensionButton Extension button for vertical toolbars. \value SP_DialogOkButton Icon for a standard OK button in a QDialogButtonBox. \value SP_DialogCancelButton Icon for a standard Cancel button in a QDialogButtonBox. \value SP_DialogHelpButton Icon for a standard Help button in a QDialogButtonBox. \value SP_DialogOpenButton Icon for a standard Open button in a QDialogButtonBox. \value SP_DialogSaveButton Icon for a standard Save button in a QDialogButtonBox. \value SP_DialogCloseButton Icon for a standard Close button in a QDialogButtonBox. \value SP_DialogApplyButton Icon for a standard Apply button in a QDialogButtonBox. \value SP_DialogResetButton Icon for a standard Reset button in a QDialogButtonBox. \value SP_DialogDiscardButton Icon for a standard Discard button in a QDialogButtonBox. \value SP_DialogYesButton Icon for a standard Yes button in a QDialogButtonBox. \value SP_DialogNoButton Icon for a standard No button in a QDialogButtonBox. \value SP_ArrowUp Icon arrow pointing up. \value SP_ArrowDown Icon arrow pointing down. \value SP_ArrowLeft Icon arrow pointing left. \value SP_ArrowRight Icon arrow pointing right. \value SP_ArrowBack Equivalent to SP_ArrowLeft when the current layout direction is Qt::LeftToRight, otherwise SP_ArrowRight. \value SP_ArrowForward Equivalent to SP_ArrowRight when the current layout direction is Qt::LeftToRight, otherwise SP_ArrowLeft. \value SP_CommandLink Icon used to indicate a Vista style command link glyph. \value SP_VistaShield Icon used to indicate UAC prompts on Windows Vista. This will return a null pixmap or icon on all other platforms. \value SP_BrowserReload Icon indicating that the current page should be reloaded. \value SP_BrowserStop Icon indicating that the page loading should stop. \value SP_MediaPlay Icon indicating that media should begin playback. \value SP_MediaStop Icon indicating that media should stop playback. \value SP_MediaPause Icon indicating that media should pause playback. \value SP_MediaSkipForward Icon indicating that media should skip forward. \value SP_MediaSkipBackward Icon indicating that media should skip backward. \value SP_MediaSeekForward Icon indicating that media should seek forward. \value SP_MediaSeekBackward Icon indicating that media should seek backward. \value SP_MediaVolume Icon indicating a volume control. \value SP_MediaVolumeMuted Icon indicating a muted volume control. \value [since 5.2] SP_LineEditClearButton Icon for a standard clear button in a QLineEdit. \value [since 5.14] SP_DialogYesToAllButton Icon for a standard YesToAll button in a QDialogButtonBox. \value [since 5.14] SP_DialogNoToAllButton Icon for a standard NoToAll button in a QDialogButtonBox. \value [since 5.14] SP_DialogSaveAllButton Icon for a standard SaveAll button in a QDialogButtonBox. \value [since 5.14] SP_DialogAbortButton Icon for a standard Abort button in a QDialogButtonBox. \value [since 5.14] SP_DialogRetryButton Icon for a standard Retry button in a QDialogButtonBox. \value [since 5.14] SP_DialogIgnoreButton Icon for a standard Ignore button in a QDialogButtonBox. \value [since 5.14] SP_RestoreDefaultsButton Icon for a standard RestoreDefaults button in a QDialogButtonBox. \value [since 6.3] SP_TabCloseButton Icon for the close button in the tab of a QTabBar. \omitvalue NStandardPixmap \value SP_CustomBase Base value for custom standard pixmaps; custom values must be greater than this value.
enum QStyle::StateFlag |
This enum describes flags that are used when drawing primitive elements.
Note that not all primitives use all of these flags, and that the flags may mean different things to different items.
\value State_None Indicates that the widget does not have a state. \value State_Active Indicates that the widget is active. \value State_AutoRaise Used to indicate if auto-raise appearance should be used on a tool button. \value State_Children Used to indicate if an item view branch has children. \value State_DownArrow Used to indicate if a down arrow should be visible on the widget. \value State_Editing Used to indicate if an editor is opened on the widget. \value State_Enabled Used to indicate if the widget is enabled. \value State_HasEditFocus Used to indicate if the widget currently has edit focus. \value State_HasFocus Used to indicate if the widget has focus. \value State_Horizontal Used to indicate if the widget is laid out horizontally, for example. a tool bar. \value State_KeyboardFocusChange Used to indicate if the focus was changed with the keyboard, e.g., tab, backtab or shortcut. \value State_MouseOver Used to indicate if the widget is under the mouse. \value State_NoChange Used to indicate a tri-state checkbox. \value State_Off Used to indicate if the widget is not checked. \value State_On Used to indicate if the widget is checked. \value State_Raised Used to indicate if a button is raised. \value State_ReadOnly Used to indicate if a widget is read-only. \value State_Selected Used to indicate if a widget is selected. \value State_Item Used by item views to indicate if a horizontal branch should be drawn. \value State_Open Used by item views to indicate if the tree branch is open. \value State_Sibling Used by item views to indicate if a vertical line needs to be drawn (for siblings). \value State_Sunken Used to indicate if the widget is sunken or pressed. \value State_UpArrow Used to indicate if an up arrow should be visible on the widget. \value State_Mini Used to indicate a mini style Mac widget or button. \value State_Small Used to indicate a small style Mac widget or button. \omitvalue State_Window \omitvalue State_Bottom \omitvalue State_FocusAtBorder \omitvalue State_Top
enum QStyle::StyleHint |
This enum describes the available style hints.
A style hint is a general look and/or feel hint.
\value SH_EtchDisabledText Disabled text is "etched" as it is on Windows.
\value SH_DitherDisabledText Disabled text is dithered as it is on Motif.
\value SH_ScrollBar_ContextMenu Whether or not a scroll bar has a context menu.
\value SH_ScrollBar_MiddleClickAbsolutePosition A boolean value. If true, middle clicking on a scroll bar causes the slider to jump to that position. If false, middle clicking is ignored.
\value SH_ScrollBar_LeftClickAbsolutePosition A boolean value. If true, left clicking on a scroll bar causes the slider to jump to that position. If false, left clicking will behave as appropriate for each control.
\value SH_ScrollBar_ScrollWhenPointerLeavesControl A boolean value. If true, when clicking a scroll bar SubControl, holding the mouse button down and moving the pointer outside the SubControl, the scroll bar continues to scroll. If false, the scollbar stops scrolling when the pointer leaves the SubControl.
\value SH_ScrollBar_RollBetweenButtons A boolean value. If true, when clicking a scroll bar button (SC_ScrollBarAddLine or SC_ScrollBarSubLine) and dragging over to the opposite button (rolling) will press the new button and release the old one. When it is false, the original button is released and nothing happens (like a push button).
\value SH_TabBar_Alignment The alignment for tabs in a QTabWidget. Possible values are Qt::AlignLeft, Qt::AlignCenter and Qt::AlignRight.
\value SH_Header_ArrowAlignment The placement of the sorting indicator may appear in list or table headers. Possible values are Qt::Alignment values (that is, an OR combination of Qt::AlignmentFlag flags).
\value SH_Slider_SnapToValue Sliders snap to values while moving, as they do on Windows.
\value SH_Slider_SloppyKeyEvents Key presses handled in a sloppy manner, i.e., left on a vertical slider subtracts a line.
\value SH_ProgressDialog_CenterCancelButton Center button on progress dialogs, otherwise right aligned.
\value SH_ProgressDialog_TextLabelAlignment The alignment for text labels in progress dialogs; Qt::AlignCenter on Windows, Qt::AlignVCenter otherwise.
\value SH_PrintDialog_RightAlignButtons Right align buttons in the print dialog, as done on Windows.
\value SH_MainWindow_SpaceBelowMenuBar One or two pixel space between the menu bar and the dockarea, as done on Windows.
\value SH_FontDialog_SelectAssociatedText Select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, as done on Windows.
\value SH_Menu_KeyboardSearch Typing causes a menu to be search for relevant items, otherwise only mnemonic is considered.
\value SH_Menu_AllowActiveAndDisabled Allows disabled menu items to be active.
\value SH_Menu_SpaceActivatesItem Pressing the space bar activates the item, as done on Motif.
\value SH_Menu_SubMenuPopupDelay The number of milliseconds to wait before opening a submenu (256 on Windows, 96 on Motif).
\value SH_Menu_Scrollable Whether popup menus must support scrolling.
\value SH_Menu_SloppySubMenus Whether popup menus must support the user moving the mouse cursor to a submenu while crossing other items of the menu. This is supported on most modern desktop platforms.
\value SH_Menu_SubMenuUniDirection Since Qt 5.5. If the cursor has to move towards the submenu (like it is on \macos), or if the cursor can move in any direction as long as it reaches the submenu before the sloppy timeout.
\value SH_Menu_SubMenuUniDirectionFailCount Since Qt 5.5. When SH_Menu_SubMenuUniDirection is defined this enum defines the number of failed mouse moves before the sloppy submenu is discarded. This can be used to control the "strictness" of the uni direction algorithm.
\value SH_Menu_SubMenuSloppySelectOtherActions Since Qt 5.5. Should other action items be selected when the mouse moves towards a sloppy submenu.
\value SH_Menu_SubMenuSloppyCloseTimeout Since Qt 5.5. The timeout used to close sloppy submenus.
\value SH_Menu_SubMenuResetWhenReenteringParent Since Qt 5.5. When entering parent from child submenu, should the sloppy state be reset, effectively closing the child and making the current submenu active.
\value SH_Menu_SubMenuDontStartSloppyOnLeave Since Qt 5.5. Do not start sloppy timers when the mouse leaves a sub-menu.
\value SH_ScrollView_FrameOnlyAroundContents Whether scrollviews draw their frame only around contents (like Motif), or around contents, scroll bars and corner widgets (like Windows).
\value SH_MenuBar_AltKeyNavigation Menu bars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item.
\value SH_ComboBox_ListMouseTracking Mouse tracking in combobox drop-down lists.
\value SH_Menu_MouseTracking Mouse tracking in popup menus.
\value SH_MenuBar_MouseTracking Mouse tracking in menu bars.
\value SH_Menu_FillScreenWithScroll Whether scrolling popups should fill the screen as they are scrolled.
\value SH_Menu_SelectionWrap Whether popups should allow the selections to wrap, that is when selection should the next item be the first item.
\value SH_ItemView_ChangeHighlightOnFocus Gray out selected items when losing focus.
\value SH_Widget_ShareActivation Turn on sharing activation with floating modeless dialogs.
\value SH_TabBar_SelectMouseType Which type of mouse event should cause a tab to be selected.
\value SH_ListViewExpand_SelectMouseType Which type of mouse event should cause a list view expansion to be selected.
\value SH_TabBar_PreferNoArrows Whether a tab bar should suggest a size to prevent scroll arrows.
\value SH_ComboBox_Popup Allows popups as a combobox drop-down menu.
\omitvalue SH_ComboBox_UseNativePopup
\value SH_Workspace_FillSpaceOnMaximize The workspace should maximize the client area.
\value SH_TitleBar_NoBorder The title bar has no border.
\value SH_Slider_StopMouseOverSlider Stops auto-repeat when the slider reaches the mouse position.
\value SH_BlinkCursorWhenTextSelected Whether cursor should blink when text is selected.
\value SH_RichText_FullWidthSelection Whether richtext selections should extend to the full width of the document.
\value SH_GroupBox_TextLabelVerticalAlignment How to vertically align a group box's text label.
\value SH_GroupBox_TextLabelColor How to paint a group box's text label.
\value SH_DialogButtons_DefaultButton Which button gets the default status in a dialog's button widget.
\value SH_ToolBox_SelectedPageTitleBold Boldness of the selected page title in a QToolBox.
\value SH_LineEdit_PasswordCharacter The Unicode character to be used for passwords.
\value SH_LineEdit_PasswordMaskDelay Determines the delay before visible character is masked with password character, in milliseconds. This enum value was added in Qt 5.4.
\value SH_Table_GridLineColor The RGBA value of the grid for a table.
\value SH_UnderlineShortcut Whether shortcuts are underlined.
\value SH_SpinBox_AnimateButton Animate a click when up or down is pressed in a spin box. \value SH_SpinBox_KeyPressAutoRepeatRate Auto-repeat interval for spinbox key presses. \value SH_SpinBox_ClickAutoRepeatRate Auto-repeat interval for spinbox mouse clicks. \value SH_SpinBox_ClickAutoRepeatThreshold Auto-repeat threshold for spinbox mouse clicks. \value [since 6.3] SH_SpinBox_SelectOnStep Whether changing the value using the buttons or up/down keys automatically selects the text.
\value SH_ToolTipLabel_Opacity An integer indicating the opacity for the tip label, 0 is completely transparent, 255 is completely opaque. \value SH_DrawMenuBarSeparator Indicates whether or not the menu bar draws separators. \value SH_TitleBar_ModifyNotification Indicates if the title bar should show a '*' for windows that are modified.
\value SH_Button_FocusPolicy The default focus policy for buttons.
\value SH_CustomBase Base value for custom style hints. Custom values must be greater than this value.
\value SH_MessageBox_UseBorderForButtonSpacing A boolean indicating what the to use the border of the buttons (computed as half the button height) for the spacing of the button in a message box.
\value SH_MessageBox_CenterButtons A boolean indicating whether the buttons in the message box should be centered or not (see QDialogButtonBox::setCentered()).
\value SH_MessageBox_TextInteractionFlags A boolean indicating if the text in a message box should allow user interactions (e.g. selection) or not.
\value SH_TitleBar_AutoRaise A boolean indicating whether controls on a title bar ought to update when the mouse is over them.
\value SH_ToolButton_PopupDelay An int indicating the popup delay in milliseconds for menus attached to tool buttons.
\value SH_FocusFrame_Mask The mask of the focus frame.
\value SH_RubberBand_Mask The mask of the rubber band.
\value SH_WindowFrame_Mask The mask of the window frame.
\value SH_SpinControls_DisableOnBounds Determines if the spin controls will shown as disabled when reaching the spin range boundary.
\value SH_Dial_BackgroundRole Defines the style's preferred background role (as QPalette::ColorRole) for a dial widget.
\value SH_ComboBox_LayoutDirection The layout direction for the combo box. By default it should be the same as indicated by the QStyleOption::direction variable.
\value SH_ItemView_EllipsisLocation The location where ellipses should be added for item text that is too long to fit in an view item.
\value SH_ItemView_ShowDecorationSelected When an item in an item view is selected, also highlight the branch or other decoration.
\value SH_ItemView_ActivateItemOnSingleClick Emit the activated signal when the user single clicks on an item in an item in an item view. Otherwise the signal is emitted when the user double clicks on an item.
\value SH_Slider_AbsoluteSetButtons Which mouse buttons cause a slider to set the value to the position clicked on.
\value SH_Slider_PageSetButtons Which mouse buttons cause a slider to page step the value.
\value SH_TabBar_ElideMode The default eliding style for a tab bar.
\value SH_DialogButtonLayout Controls how buttons are laid out in a QDialogButtonBox, returns a QDialogButtonBox::ButtonLayout enum.
\value SH_WizardStyle Controls the look and feel of a QWizard. Returns a QWizard::WizardStyle enum.
\value SH_FormLayoutWrapPolicy Provides a default for how rows are wrapped in a QFormLayout. Returns a QFormLayout::RowWrapPolicy enum. \value SH_FormLayoutFieldGrowthPolicy Provides a default for how fields can grow in a QFormLayout. Returns a QFormLayout::FieldGrowthPolicy enum. \value SH_FormLayoutFormAlignment Provides a default for how a QFormLayout aligns its contents within the available space. Returns a Qt::Alignment enum. \value SH_FormLayoutLabelAlignment Provides a default for how a QFormLayout aligns labels within the available space. Returns a Qt::Alignment enum.
\value SH_ItemView_ArrowKeysNavigateIntoChildren Controls whether the tree view will select the first child when it is exapanded and the right arrow key is pressed. \value SH_ComboBox_PopupFrameStyle The frame style used when drawing a combobox popup menu.
\value SH_DialogButtonBox_ButtonsHaveIcons Indicates whether or not StandardButtons in QDialogButtonBox should have icons or not. \value SH_ItemView_MovementWithoutUpdatingSelection The item view is able to indicate a current item without changing the selection. \value SH_ToolTip_Mask The mask of a tool tip.
\value SH_FocusFrame_AboveWidget The FocusFrame is stacked above the widget that it is "focusing on".
\value SH_TextControl_FocusIndicatorTextCharFormat Specifies the text format used to highlight focused anchors in rich text documents displayed for example in QTextBrowser. The format has to be a QTextCharFormat returned in the variant of the QStyleHintReturnVariant return value. The QTextFormat::OutlinePen property is used for the outline and QTextFormat::BackgroundBrush for the background of the highlighted area.
\value SH_Menu_FlashTriggeredItem Flash triggered item. \value SH_Menu_FadeOutOnHide Fade out the menu instead of hiding it immediately.
\value SH_TabWidget_DefaultTabPosition Default position of the tab bar in a tab widget.
\value SH_ToolBar_Movable Determines if the tool bar is movable by default.
\value SH_ItemView_PaintAlternatingRowColorsForEmptyArea Whether QTreeView paints alternating row colors for the area that does not have any items.
\value SH_Menu_Mask The mask for a popup menu.
\value SH_ItemView_DrawDelegateFrame Determines if there should be a frame for a delegate widget.
\value SH_TabBar_CloseButtonPosition Determines the position of the close button on a tab in a tab bar.
\value SH_DockWidget_ButtonsHaveFrame Determines if dockwidget buttons should have frames. Default is true.
\value SH_ToolButtonStyle Determines the default system style for tool buttons that uses Qt::ToolButtonFollowStyle.
\value SH_RequestSoftwareInputPanel Determines when a software input panel should be requested by input widgets. Returns an enum of type QStyle::RequestSoftwareInputPanel.
\value SH_ScrollBar_Transient Determines if the style supports transient scroll bars. Transient scroll bars appear when the content is scrolled and disappear when they are no longer needed.
\value SH_Menu_SupportsSections Determines if the style displays sections in menus or treat them as plain separators. Sections are separators with a text and icon hint.
\value SH_ToolTip_WakeUpDelay Determines the delay before a tooltip is shown, in milliseconds.
\value SH_ToolTip_FallAsleepDelay Determines the delay (in milliseconds) before a new wake time is needed when a tooltip is shown (notice: shown, not hidden). When a new wake isn't needed, a user-requested tooltip will be shown nearly instantly.
\value SH_Widget_Animate Deprecated. Use \l{SH_Widget_Animation_Duration} instead.
\value SH_Splitter_OpaqueResize Determines if widgets are resized dynamically (opaquely) while interactively moving the splitter. This enum value was introduced in Qt 5.2.
\value SH_TabBar_ChangeCurrentDelay Determines the delay before the current tab is changed while dragging over the tabbar, in milliseconds. This enum value has been introduced in Qt 5.4
\value SH_ItemView_ScrollMode The default vertical and horizontal scroll mode as specified by the style. Can be overridden with QAbstractItemView::setVerticalScrollMode() and QAbstractItemView::setHorizontalScrollMode(). This enum value has been introduced in Qt 5.7.
\value SH_TitleBar_ShowToolTipsOnButtons Determines if tool tips are shown on window title bar buttons. The Mac style, for example, sets this to false. This enum value has been introduced in Qt 5.10.
\value SH_Widget_Animation_Duration Determines how much an animation should last (in ms). A value equal to zero means that the animations will be disabled. This enum value has been introduced in Qt 5.10.
\value SH_ComboBox_AllowWheelScrolling Determines if the mouse wheel can be used to scroll inside a QComboBox. This is on by default in all styles except the Mac style. This enum value has been introduced in Qt 5.10.
\value SH_SpinBox_ButtonsInsideFrame Determines if the spin box buttons are inside the line edit frame. This enum value has been introduced in Qt 5.11.
\value SH_SpinBox_StepModifier Determines which Qt::KeyboardModifier increases the step rate of QAbstractSpinBox. Possible values are Qt::NoModifier, Qt::ControlModifier (default) or Qt::ShiftModifier. Qt::NoModifier disables this feature. This enum value has been introduced in Qt 5.12.
\value SH_TabBar_AllowWheelScrolling Determines if the mouse wheel can be used to cycle through the tabs of a QTabBar. This enum value has been introduced in Qt 6.1.
\value SH_Table_AlwaysDrawLeftTopGridLines Determines if the far left and top grid lines are drawn in a table or not when the header is hidden. Defaults to false. This enum value has been introduced in Qt 6.3.
enum QStyle::SubControl |
This enum describes the available sub controls.
A subcontrol is a control element within a complex control (ComplexControl).
\value SC_None Special value that matches no other sub control.
\value SC_ScrollBarAddLine Scroll bar add line (i.e., down/right arrow); see also QScrollBar. \value SC_ScrollBarSubLine Scroll bar sub line (i.e., up/left arrow). \value SC_ScrollBarAddPage Scroll bar add page (i.e., page down). \value SC_ScrollBarSubPage Scroll bar sub page (i.e., page up). \value SC_ScrollBarFirst Scroll bar first line (i.e., home). \value SC_ScrollBarLast Scroll bar last line (i.e., end). \value SC_ScrollBarSlider Scroll bar slider handle. \value SC_ScrollBarGroove Special sub-control which contains the area in which the slider handle may move.
\value SC_SpinBoxUp Spin widget up/increase; see also QSpinBox. \value SC_SpinBoxDown Spin widget down/decrease. \value SC_SpinBoxFrame Spin widget frame. \value SC_SpinBoxEditField Spin widget edit field.
\value SC_ComboBoxEditField Combobox edit field; see also QComboBox. \value SC_ComboBoxArrow Combobox arrow button. \value SC_ComboBoxFrame Combobox frame. \value SC_ComboBoxListBoxPopup The reference rectangle for the combobox popup. Used to calculate the position of the popup.
\value SC_SliderGroove Special sub-control which contains the area in which the slider handle may move. \value SC_SliderHandle Slider handle. \value SC_SliderTickmarks Slider tickmarks.
\value SC_ToolButton Tool button (see also QToolButton). \value SC_ToolButtonMenu Sub-control for opening a popup menu in a tool button.
\value SC_TitleBarSysMenu System menu button (i.e., restore, close, etc.). \value SC_TitleBarMinButton Minimize button. \value SC_TitleBarMaxButton Maximize button. \value SC_TitleBarCloseButton Close button. \value SC_TitleBarLabel Window title label. \value SC_TitleBarNormalButton Normal (restore) button. \value SC_TitleBarShadeButton Shade button. \value SC_TitleBarUnshadeButton Unshade button. \value SC_TitleBarContextHelpButton Context Help button.
\value SC_DialHandle The handle of the dial (i.e. what you use to control the dial). \value SC_DialGroove The groove for the dial. \value SC_DialTickmarks The tickmarks for the dial.
\value SC_GroupBoxFrame The frame of a group box. \value SC_GroupBoxLabel The title of a group box. \value SC_GroupBoxCheckBox The optional check box of a group box. \value SC_GroupBoxContents The group box contents.
\value SC_MdiNormalButton The normal button for a MDI subwindow in the menu bar. \value SC_MdiMinButton The minimize button for a MDI subwindow in the menu bar. \value SC_MdiCloseButton The close button for a MDI subwindow in the menu bar.
\value SC_All Special value that matches all sub-controls. \omitvalue SC_CustomBase
enum QStyle::SubElement |
This enum represents a sub-area of a widget.
Style implementations use these areas to draw the different parts of a widget.
\value SE_PushButtonContents Area containing the label (icon with text or pixmap). \value SE_PushButtonFocusRect Area for the focus rect (usually larger than the contents rect). \value SE_PushButtonLayoutItem Area that counts for the parent layout. \value SE_PushButtonBevel [since 5.15] Area used for the bevel of the button.
\value SE_CheckBoxIndicator Area for the state indicator (e.g., check mark). \value SE_CheckBoxContents Area for the label (text or pixmap). \value SE_CheckBoxFocusRect Area for the focus indicator. \value SE_CheckBoxClickRect Clickable area, defaults to SE_CheckBoxFocusRect. \value SE_CheckBoxLayoutItem Area that counts for the parent layout.
\value SE_DateTimeEditLayoutItem Area that counts for the parent layout.
\value SE_RadioButtonIndicator Area for the state indicator. \value SE_RadioButtonContents Area for the label. \value SE_RadioButtonFocusRect Area for the focus indicator. \value SE_RadioButtonClickRect Clickable area, defaults to SE_RadioButtonFocusRect. \value SE_RadioButtonLayoutItem Area that counts for the parent layout.
\value SE_ComboBoxFocusRect Area for the focus indicator.
\value SE_SliderFocusRect Area for the focus indicator. \value SE_SliderLayoutItem Area that counts for the parent layout.
\value SE_SpinBoxLayoutItem Area that counts for the parent layout.
\value SE_ProgressBarGroove Area for the groove. \value SE_ProgressBarContents Area for the progress indicator. \value SE_ProgressBarLabel Area for the text label. \value SE_ProgressBarLayoutItem Area that counts for the parent layout.
\value SE_FrameContents Area for a frame's contents. \value SE_ShapedFrameContents Area for a frame's contents using the shape in QStyleOptionFrame; see QFrame \value SE_FrameLayoutItem Area that counts for the parent layout.
\value SE_HeaderArrow Area for the sort indicator for a header. \value SE_HeaderLabel Area for the label in a header.
\value SE_LabelLayoutItem Area that counts for the parent layout.
\value SE_LineEditContents Area for a line edit's contents.
\value SE_TabWidgetLeftCorner Area for the left corner widget in a tab widget. \value SE_TabWidgetRightCorner Area for the right corner widget in a tab widget. \value SE_TabWidgetTabBar Area for the tab bar widget in a tab widget. \value SE_TabWidgetTabContents Area for the contents of the tab widget. \value SE_TabWidgetTabPane Area for the pane of a tab widget. \value SE_TabWidgetLayoutItem Area that counts for the parent layout.
\value SE_ToolBoxTabContents Area for a toolbox tab's icon and label.
\value SE_ToolButtonLayoutItem Area that counts for the parent layout.
\value SE_ItemViewItemCheckIndicator Area for a view item's check mark.
\value SE_TabBarTearIndicator Deprecated. Use SE_TabBarTearIndicatorLeft instead. \value SE_TabBarTearIndicatorLeft Area for the tear indicator on the left side of a tab bar with scroll arrows. \value SE_TabBarTearIndicatorRight Area for the tear indicator on the right side of a tab bar with scroll arrows.
\value SE_TabBarScrollLeftButton Area for the scroll left button on a tab bar with scroll buttons. \value SE_TabBarScrollRightButton Area for the scroll right button on a tab bar with scroll buttons.
\value SE_TreeViewDisclosureItem Area for the actual disclosure item in a tree branch.
\value SE_GroupBoxLayoutItem Area that counts for the parent layout.
\value SE_CustomBase Base value for custom sub-elements. Custom values must be greater than this value.
\value SE_DockWidgetFloatButton The float button of a dock widget. \value SE_DockWidgetTitleBarText The text bounds of the dock widgets title. \value SE_DockWidgetCloseButton The close button of a dock widget. \value SE_DockWidgetIcon The icon of a dock widget. \value SE_ComboBoxLayoutItem Area that counts for the parent layout.
\value SE_ItemViewItemDecoration Area for a view item's decoration (icon). \value SE_ItemViewItemText Area for a view item's text. \value SE_ItemViewItemFocusRect Area for a view item's focus rect.
\value SE_TabBarTabLeftButton Area for a widget on the left side of a tab in a tab bar. \value SE_TabBarTabRightButton Area for a widget on the right side of a tab in a tab bar. \value SE_TabBarTabText Area for the text on a tab in a tab bar.
\value SE_ToolBarHandle Area for the handle of a tool bar.
|
protected |
Constructs a style object.
Definition at line 372 of file qstyle.cpp.
QStyle::QStyle | ( | ) |
Constructs a style object.
Definition at line 360 of file qstyle.cpp.
|
virtual |
Destroys the style object.
Definition at line 385 of file qstyle.cpp.
|
static |
Returns a new rectangle of the specified size that is aligned to the given rectangle according to the specified alignment and direction.
Definition at line 2174 of file qstyle.cpp.
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 \l{QSizePolicy::ControlTypes}{control types}.
This function is called by the layout system. It is used only if PM_LayoutHorizontalSpacing or PM_LayoutVerticalSpacing returns a negative value.
Definition at line 2372 of file qstyle.cpp.
|
pure virtual |
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 \l {QStyle::StateFlag}{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.
\table \header
\row
\row
\row
\row
\row
\row
\endtable
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
pure virtual |
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.
\table \header
\row
\row
\row
\row
\row
\row
\row
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
virtual |
Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.
Reimplemented in QProxyStyle.
Definition at line 613 of file qstyle.cpp.
|
virtual |
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.
Reimplemented in QMacStyle, QProxyStyle, and QQC2_NAMESPACE::QMacStyle.
Definition at line 575 of file qstyle.cpp.
|
pure virtual |
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.
\table \header
Implemented in CustomStyle, QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
pure virtual |
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.
Implemented in QCommonStyle, QMacStyle, QProxyStyle, and QQC2_NAMESPACE::QMacStyle.
|
pure virtual |
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.
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.
Reimplemented in QProxyStyle.
Definition at line 535 of file qstyle.cpp.
|
virtual |
Returns the area within the given rectangle in which to draw the provided text according to the specified font metrics and alignment.
The enabled parameter indicates whether or not the associated item is enabled.
If the given rectangle is larger than the area needed to render the text, the rectangle that is returned will be offset within rectangle according to the specified alignment. For example, if alignment is Qt::AlignCenter, the returned rectangle will be centered within rectangle. If the given rectangle is smaller than the area needed, the returned rectangle will be the smallest rectangle large enough to render the text.
Reimplemented in QProxyStyle.
Definition at line 511 of file qstyle.cpp.
|
pure virtual |
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.
Implemented in QCommonStyle, QMacStyle, and QProxyStyle.
QString QStyle::name | ( | ) | const |
Returns the name of the style.
This value can be used to create a style with QStyleFactory::create().
Definition at line 397 of file qstyle.cpp.
Referenced by testing.tools.encode_pdf_filter._PdfStream::RegisterByName().
|
pure virtual |
Returns the value of the given pixel metric.
The specified option and widget can be used for calculating the metric. 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:
\table \header
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.
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Late initialization of the given application object.
Reimplemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Definition at line 466 of file qstyle.cpp.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Changes the palette according to style specific requirements for color palettes (if any).
Reimplemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Definition at line 489 of file qstyle.cpp.
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.
Reimplemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Definition at line 437 of file qstyle.cpp.
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.
Definition at line 2401 of file qstyle.cpp.
|
pure virtual |
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:
\table \header
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
static |
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.
Definition at line 2223 of file qstyle.cpp.
|
static |
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.
Definition at line 2268 of file qstyle.cpp.
|
pure virtual |
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.
Implemented in QCommonStyle, QMacStyle, and QProxyStyle.
|
virtual |
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().
Reimplemented in QMacStyle, and QProxyStyle.
Definition at line 2302 of file qstyle.cpp.
|
pure virtual |
A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.
Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement standardIcon().
A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.
Developers calling standardPixmap() should instead call standardIcon() Developers who re-implemented standardPixmap() should instead re-implement standardIcon().
Implemented in QCommonStyle, QMacStyle, and QProxyStyle.
|
pure virtual |
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.
Implemented in MyProxyStyle, MyProxyStyle, QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
pure virtual |
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.
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
pure virtual |
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:
\table \header
Implemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
|
virtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Uninitialize the given application.
Reimplemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Definition at line 476 of file qstyle.cpp.
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.
Reimplemented in QCommonStyle, QMacStyle, QPixmapStyle, and QProxyStyle.
Definition at line 456 of file qstyle.cpp.
|
static |
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.
Definition at line 2203 of file qstyle.cpp.
|
static |
Returns the given logicalPosition converted to screen coordinates based on the specified direction.
The boundingRectangle is used when performing the translation.
Definition at line 2163 of file qstyle.cpp.
|
static |
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.
Definition at line 2144 of file qstyle.cpp.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |