Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQC2::QStyle Class Referenceabstract

#include <qquickstyle.h>

+ Inheritance diagram for QQC2::QStyle:
+ Collaboration diagram for QQC2::QStyle:

Public Types

enum  StateFlag {
  State_None = 0x00000000 , State_Enabled = 0x00000001 , State_Raised = 0x00000002 , State_Sunken = 0x00000004 ,
  State_Off = 0x00000008 , State_NoChange = 0x00000010 , State_On = 0x00000020 , State_DownArrow = 0x00000040 ,
  State_Horizontal = 0x00000080 , State_HasFocus = 0x00000100 , State_Top = 0x00000200 , State_Bottom = 0x00000400 ,
  State_FocusAtBorder = 0x00000800 , State_AutoRaise = 0x00001000 , State_MouseOver = 0x00002000 , State_UpArrow = 0x00004000 ,
  State_Selected = 0x00008000 , State_Active = 0x00010000 , State_Window = 0x00020000 , State_Open = 0x00040000 ,
  State_Children = 0x00080000 , State_Item = 0x00100000 , State_Sibling = 0x00200000 , State_Editing = 0x00400000 ,
  State_KeyboardFocusChange = 0x00800000 , State_ReadOnly = 0x02000000 , State_Small = 0x04000000 , State_Mini = 0x08000000
}
 
enum  PrimitiveElement {
  PE_Frame , PE_FrameDefaultButton , PE_FrameDockWidget , PE_FrameFocusRect ,
  PE_FrameGroupBox , PE_FrameLineEdit , PE_FrameMenu , PE_FrameStatusBarItem ,
  PE_FrameTabWidget , PE_FrameWindow , PE_FrameButtonBevel , PE_FrameButtonTool ,
  PE_FrameTabBarBase , PE_PanelButtonCommand , PE_PanelButtonBevel , PE_PanelButtonTool ,
  PE_PanelMenuBar , PE_PanelToolBar , PE_PanelLineEdit , PE_IndicatorArrowDown ,
  PE_IndicatorArrowLeft , PE_IndicatorArrowRight , PE_IndicatorArrowUp , PE_IndicatorBranch ,
  PE_IndicatorButtonDropDown , PE_IndicatorItemViewItemCheck , PE_IndicatorCheckBox , PE_IndicatorDockWidgetResizeHandle ,
  PE_IndicatorHeaderArrow , PE_IndicatorMenuCheckMark , PE_IndicatorProgressChunk , PE_IndicatorRadioButton ,
  PE_IndicatorSpinDown , PE_IndicatorSpinMinus , PE_IndicatorSpinPlus , PE_IndicatorSpinUp ,
  PE_IndicatorToolBarHandle , PE_IndicatorToolBarSeparator , PE_PanelTipLabel , PE_IndicatorTabTear ,
  PE_IndicatorTabTearLeft = PE_IndicatorTabTear , PE_PanelScrollAreaCorner , PE_Widget , PE_IndicatorColumnViewArrow ,
  PE_IndicatorItemViewItemDrop , PE_PanelItemViewItem , PE_PanelItemViewRow , PE_PanelStatusBar ,
  PE_IndicatorTabClose , PE_PanelMenu , PE_IndicatorTabTearRight , PE_CustomBase = 0xf000000
}
 
enum  ControlElement {
  CE_PushButton , CE_PushButtonBevel , CE_PushButtonLabel , CE_CheckBox ,
  CE_CheckBoxLabel , CE_RadioButton , CE_RadioButtonLabel , CE_TabBarTab ,
  CE_TabBarTabShape , CE_TabBarTabLabel , CE_ProgressBar , CE_ProgressBarGroove ,
  CE_ProgressBarContents , CE_ProgressBarLabel , CE_MenuItem , CE_MenuScroller ,
  CE_MenuVMargin , CE_MenuHMargin , CE_MenuTearoff , CE_MenuEmptyArea ,
  CE_MenuBarItem , CE_MenuBarEmptyArea , CE_ToolButtonLabel , CE_Header ,
  CE_HeaderSection , CE_HeaderLabel , CE_ToolBoxTab , CE_SizeGrip ,
  CE_Splitter , CE_RubberBand , CE_DockWidgetTitle , CE_ScrollBarAddLine ,
  CE_ScrollBarSubLine , CE_ScrollBarAddPage , CE_ScrollBarSubPage , CE_ScrollBarSlider ,
  CE_ScrollBarFirst , CE_ScrollBarLast , CE_FocusFrame , CE_ComboBoxLabel ,
  CE_ToolBar , CE_ToolBoxTabShape , CE_ToolBoxTabLabel , CE_HeaderEmptyArea ,
  CE_ColumnViewGrip , CE_ItemViewItem , CE_ShapedFrame , CE_CustomBase = 0xf0000000
}
 
enum  SubElement {
  SE_PushButtonContents , SE_PushButtonFocusRect , SE_CheckBoxIndicator , SE_CheckBoxContents ,
  SE_CheckBoxFocusRect , SE_CheckBoxClickRect , SE_RadioButtonIndicator , SE_RadioButtonContents ,
  SE_RadioButtonFocusRect , SE_RadioButtonClickRect , SE_ComboBoxFocusRect , SE_SliderFocusRect ,
  SE_ProgressBarGroove , SE_ProgressBarContents , SE_ProgressBarLabel , SE_ToolBoxTabContents ,
  SE_HeaderLabel , SE_HeaderArrow , SE_TabWidgetTabBar , SE_TabWidgetTabPane ,
  SE_TabWidgetTabContents , SE_TabWidgetLeftCorner , SE_TabWidgetRightCorner , SE_ItemViewItemCheckIndicator ,
  SE_TabBarTearIndicator , SE_TabBarTearIndicatorLeft = SE_TabBarTearIndicator , SE_TreeViewDisclosureItem , SE_LineEditContents ,
  SE_FrameContents , SE_DockWidgetCloseButton , SE_DockWidgetFloatButton , SE_DockWidgetTitleBarText ,
  SE_DockWidgetIcon , SE_CheckBoxLayoutItem , SE_ComboBoxLayoutItem , SE_DateTimeEditLayoutItem ,
  SE_LabelLayoutItem , SE_ProgressBarLayoutItem , SE_PushButtonLayoutItem , SE_RadioButtonLayoutItem ,
  SE_SliderLayoutItem , SE_ScrollBarLayoutItem , SE_SpinBoxLayoutItem , SE_ToolButtonLayoutItem ,
  SE_FrameLayoutItem , SE_GroupBoxLayoutItem , SE_TabWidgetLayoutItem , SE_ItemViewItemDecoration ,
  SE_ItemViewItemText , SE_ItemViewItemFocusRect , SE_TabBarTabLeftButton , SE_TabBarTabRightButton ,
  SE_TabBarTabText , SE_ShapedFrameContents , SE_ToolBarHandle , SE_TabBarScrollLeftButton ,
  SE_TabBarScrollRightButton , SE_TabBarTearIndicatorRight , SE_CustomBase = 0xf0000000
}
 
enum  ComplexControl {
  CC_SpinBox , CC_ComboBox , CC_ScrollBar , CC_Slider ,
  CC_ToolButton , CC_TitleBar , CC_Dial , CC_GroupBox ,
  CC_MdiControls , CC_CustomBase = 0xf0000000
}
 
enum  SubControl {
  SC_None = 0x00000000 , SC_ScrollBarAddLine = 0x00000001 , SC_ScrollBarSubLine = 0x00000002 , SC_ScrollBarAddPage = 0x00000004 ,
  SC_ScrollBarSubPage = 0x00000008 , SC_ScrollBarFirst = 0x00000010 , SC_ScrollBarLast = 0x00000020 , SC_ScrollBarSlider = 0x00000040 ,
  SC_ScrollBarGroove = 0x00000080 , SC_SpinBoxUp = 0x00000001 , SC_SpinBoxDown = 0x00000002 , SC_SpinBoxFrame = 0x00000004 ,
  SC_SpinBoxEditField = 0x00000008 , SC_ComboBoxFrame = 0x00000001 , SC_ComboBoxEditField = 0x00000002 , SC_ComboBoxArrow = 0x00000004 ,
  SC_ComboBoxListBoxPopup = 0x00000008 , SC_SliderGroove = 0x00000001 , SC_SliderHandle = 0x00000002 , SC_SliderTickmarks = 0x00000004 ,
  SC_ToolButton = 0x00000001 , SC_ToolButtonMenu = 0x00000002 , SC_TitleBarSysMenu = 0x00000001 , SC_TitleBarMinButton = 0x00000002 ,
  SC_TitleBarMaxButton = 0x00000004 , SC_TitleBarCloseButton = 0x00000008 , SC_TitleBarNormalButton = 0x00000010 , SC_TitleBarShadeButton = 0x00000020 ,
  SC_TitleBarUnshadeButton = 0x00000040 , SC_TitleBarContextHelpButton = 0x00000080 , SC_TitleBarLabel = 0x00000100 , SC_DialGroove = 0x00000001 ,
  SC_DialHandle = 0x00000002 , SC_DialTickmarks = 0x00000004 , SC_GroupBoxCheckBox = 0x00000001 , SC_GroupBoxLabel = 0x00000002 ,
  SC_GroupBoxContents = 0x00000004 , SC_GroupBoxFrame = 0x00000008 , SC_MdiMinButton = 0x00000001 , SC_MdiNormalButton = 0x00000002 ,
  SC_MdiCloseButton = 0x00000004 , SC_CustomBase = 0xf0000000 , SC_All = 0xffffffff
}
 
enum  PixelMetric {
  PM_ButtonMargin , PM_ButtonDefaultIndicator , PM_MenuButtonIndicator , PM_ButtonShiftHorizontal ,
  PM_ButtonShiftVertical , PM_DefaultFrameWidth , PM_SpinBoxFrameWidth , PM_ComboBoxFrameWidth ,
  PM_MaximumDragDistance , PM_ScrollBarExtent , PM_ScrollBarSliderMin , PM_SliderThickness ,
  PM_SliderControlThickness , PM_SliderLength , PM_SliderTickmarkOffset , PM_SliderSpaceAvailable ,
  PM_DockWidgetSeparatorExtent , PM_DockWidgetHandleExtent , PM_DockWidgetFrameWidth , PM_TabBarTabOverlap ,
  PM_TabBarTabHSpace , PM_TabBarTabVSpace , PM_TabBarBaseHeight , PM_TabBarBaseOverlap ,
  PM_ProgressBarChunkWidth , PM_SplitterWidth , PM_TitleBarHeight , PM_MenuScrollerHeight ,
  PM_MenuHMargin , PM_MenuVMargin , PM_MenuPanelWidth , PM_MenuTearoffHeight ,
  PM_MenuDesktopFrameWidth , PM_MenuBarPanelWidth , PM_MenuBarItemSpacing , PM_MenuBarVMargin ,
  PM_MenuBarHMargin , PM_IndicatorWidth , PM_IndicatorHeight , PM_ExclusiveIndicatorWidth ,
  PM_ExclusiveIndicatorHeight , PM_DialogButtonsSeparator , PM_DialogButtonsButtonWidth , PM_DialogButtonsButtonHeight ,
  PM_MdiSubWindowFrameWidth , PM_MdiSubWindowMinimizedWidth , PM_HeaderMargin , PM_HeaderMarkSize ,
  PM_HeaderGripMargin , PM_TabBarTabShiftHorizontal , PM_TabBarTabShiftVertical , PM_TabBarScrollButtonWidth ,
  PM_ToolBarFrameWidth , PM_ToolBarHandleExtent , PM_ToolBarItemSpacing , PM_ToolBarItemMargin ,
  PM_ToolBarSeparatorExtent , PM_ToolBarExtensionExtent , PM_SpinBoxSliderHeight , PM_DefaultTopLevelMargin ,
  PM_DefaultChildMargin , PM_DefaultLayoutSpacing , PM_ToolBarIconSize , PM_ListViewIconSize ,
  PM_IconViewIconSize , PM_SmallIconSize , PM_LargeIconSize , PM_FocusFrameVMargin ,
  PM_FocusFrameHMargin , PM_ToolTipLabelFrameWidth , PM_CheckBoxLabelSpacing , PM_TabBarIconSize ,
  PM_SizeGripSize , PM_DockWidgetTitleMargin , PM_MessageBoxIconSize , PM_ButtonIconSize ,
  PM_DockWidgetTitleBarButtonMargin , PM_RadioButtonLabelSpacing , PM_LayoutLeftMargin , PM_LayoutTopMargin ,
  PM_LayoutRightMargin , PM_LayoutBottomMargin , PM_LayoutHorizontalSpacing , PM_LayoutVerticalSpacing ,
  PM_TabBar_ScrollButtonOverlap , PM_TextCursorWidth , PM_TabCloseIndicatorWidth , PM_TabCloseIndicatorHeight ,
  PM_ScrollView_ScrollBarSpacing , PM_ScrollView_ScrollBarOverlap , PM_SubMenuOverlap , PM_TreeViewIndentation ,
  PM_HeaderDefaultSectionSizeHorizontal , PM_HeaderDefaultSectionSizeVertical , PM_TitleBarButtonIconSize , PM_TitleBarButtonSize ,
  PM_PushButtonFocusFrameRadius , PM_CheckBoxFocusFrameRadius , PM_ComboBoxFocusFrameRadius , PM_DialFocusFrameRadius ,
  PM_RadioButtonFocusFrameRadius , PM_SliderFocusFrameRadius , PM_SpinBoxFocusFrameRadius , PM_TextAreaFocusFrameRadius ,
  PM_TextFieldFocusFrameRadius , PM_CustomBase = 0xf0000000
}
 
enum  ContentsType {
  CT_PushButton , CT_CheckBox , CT_RadioButton , CT_ToolButton ,
  CT_ComboBox , CT_Splitter , CT_ProgressBar , CT_MenuItem ,
  CT_MenuBarItem , CT_MenuBar , CT_Menu , CT_TabBarTab ,
  CT_Slider , CT_Dial , CT_ScrollBar , CT_LineEdit ,
  CT_SpinBox , CT_SizeGrip , CT_TabWidget , CT_DialogButtons ,
  CT_HeaderSection , CT_GroupBox , CT_MdiControls , CT_ItemViewItem ,
  CT_Frame , CT_CustomBase = 0xf0000000
}
 
enum  RequestSoftwareInputPanel { RSIP_OnMouseClickAndAlreadyFocused , RSIP_OnMouseClick }
 
enum  StyleHint {
  SH_EtchDisabledText , SH_DitherDisabledText , SH_ScrollBar_MiddleClickAbsolutePosition , SH_ScrollBar_ScrollWhenPointerLeavesControl ,
  SH_TabBar_SelectMouseType , SH_TabBar_Alignment , SH_Header_ArrowAlignment , SH_Slider_SnapToValue ,
  SH_Slider_SloppyKeyEvents , SH_ProgressDialog_CenterCancelButton , SH_ProgressDialog_TextLabelAlignment , SH_PrintDialog_RightAlignButtons ,
  SH_MainWindow_SpaceBelowMenuBar , SH_FontDialog_SelectAssociatedText , SH_Menu_AllowActiveAndDisabled , SH_Menu_SpaceActivatesItem ,
  SH_Menu_SubMenuPopupDelay , SH_ScrollView_FrameOnlyAroundContents , SH_MenuBar_AltKeyNavigation , SH_ComboBox_ListMouseTracking ,
  SH_Menu_MouseTracking , SH_MenuBar_MouseTracking , SH_ItemView_ChangeHighlightOnFocus , SH_Widget_ShareActivation ,
  SH_Workspace_FillSpaceOnMaximize , SH_ComboBox_Popup , SH_TitleBar_NoBorder , SH_Slider_StopMouseOverSlider ,
  SH_BlinkCursorWhenTextSelected , SH_RichText_FullWidthSelection , SH_Menu_Scrollable , SH_GroupBox_TextLabelVerticalAlignment ,
  SH_GroupBox_TextLabelColor , SH_Menu_SloppySubMenus , SH_Table_GridLineColor , SH_LineEdit_PasswordCharacter ,
  SH_DialogButtons_DefaultButton , SH_ToolBox_SelectedPageTitleBold , SH_TabBar_PreferNoArrows , SH_ScrollBar_LeftClickAbsolutePosition ,
  SH_ListViewExpand_SelectMouseType , SH_UnderlineShortcut , SH_SpinBox_AnimateButton , SH_SpinBox_KeyPressAutoRepeatRate ,
  SH_SpinBox_ClickAutoRepeatRate , SH_Menu_FillScreenWithScroll , SH_ToolTipLabel_Opacity , SH_DrawMenuBarSeparator ,
  SH_TitleBar_ModifyNotification , SH_Button_FocusPolicy , SH_MessageBox_UseBorderForButtonSpacing , SH_TitleBar_AutoRaise ,
  SH_ToolButton_PopupDelay , SH_FocusFrame_Mask , SH_RubberBand_Mask , SH_WindowFrame_Mask ,
  SH_SpinControls_DisableOnBounds , SH_Dial_BackgroundRole , SH_ComboBox_LayoutDirection , SH_ItemView_EllipsisLocation ,
  SH_ItemView_ShowDecorationSelected , SH_ItemView_ActivateItemOnSingleClick , SH_ScrollBar_ContextMenu , SH_ScrollBar_RollBetweenButtons ,
  SH_Slider_AbsoluteSetButtons , SH_Slider_PageSetButtons , SH_Menu_KeyboardSearch , SH_TabBar_ElideMode ,
  SH_DialogButtonLayout , SH_ComboBox_PopupFrameStyle , SH_MessageBox_TextInteractionFlags , SH_DialogButtonBox_ButtonsHaveIcons ,
  SH_SpellCheckUnderlineStyle , SH_MessageBox_CenterButtons , SH_Menu_SelectionWrap , SH_ItemView_MovementWithoutUpdatingSelection ,
  SH_ToolTip_Mask , SH_FocusFrame_AboveWidget , SH_TextControl_FocusIndicatorTextCharFormat , SH_WizardStyle ,
  SH_ItemView_ArrowKeysNavigateIntoChildren , SH_Menu_Mask , SH_Menu_FlashTriggeredItem , SH_Menu_FadeOutOnHide ,
  SH_SpinBox_ClickAutoRepeatThreshold , SH_ItemView_PaintAlternatingRowColorsForEmptyArea , SH_FormLayoutWrapPolicy , SH_TabWidget_DefaultTabPosition ,
  SH_ToolBar_Movable , SH_FormLayoutFieldGrowthPolicy , SH_FormLayoutFormAlignment , SH_FormLayoutLabelAlignment ,
  SH_ItemView_DrawDelegateFrame , SH_TabBar_CloseButtonPosition , SH_DockWidget_ButtonsHaveFrame , SH_ToolButtonStyle ,
  SH_RequestSoftwareInputPanel , SH_ScrollBar_Transient , SH_Menu_SupportsSections , SH_ToolTip_WakeUpDelay ,
  SH_ToolTip_FallAsleepDelay , SH_Widget_Animate , SH_Splitter_OpaqueResize , SH_ComboBox_UseNativePopup ,
  SH_LineEdit_PasswordMaskDelay , SH_TabBar_ChangeCurrentDelay , SH_Menu_SubMenuUniDirection , SH_Menu_SubMenuUniDirectionFailCount ,
  SH_Menu_SubMenuSloppySelectOtherActions , SH_Menu_SubMenuSloppyCloseTimeout , SH_Menu_SubMenuResetWhenReenteringParent , SH_Menu_SubMenuDontStartSloppyOnLeave ,
  SH_ItemView_ScrollMode , SH_TitleBar_ShowToolTipsOnButtons , SH_Widget_Animation_Duration , SH_ComboBox_AllowWheelScrolling ,
  SH_SpinBox_ButtonsInsideFrame , SH_SpinBox_StepModifier , SH_CustomBase = 0xf0000000
}
 
enum  StandardPixmap {
  SP_TitleBarMenuButton , SP_TitleBarMinButton , SP_TitleBarMaxButton , SP_TitleBarCloseButton ,
  SP_TitleBarNormalButton , SP_TitleBarShadeButton , SP_TitleBarUnshadeButton , SP_TitleBarContextHelpButton ,
  SP_DockWidgetCloseButton , SP_MessageBoxInformation , SP_MessageBoxWarning , SP_MessageBoxCritical ,
  SP_MessageBoxQuestion , SP_DesktopIcon , SP_TrashIcon , SP_ComputerIcon ,
  SP_DriveFDIcon , SP_DriveHDIcon , SP_DriveCDIcon , SP_DriveDVDIcon ,
  SP_DriveNetIcon , SP_DirOpenIcon , SP_DirClosedIcon , SP_DirLinkIcon ,
  SP_DirLinkOpenIcon , SP_FileIcon , SP_FileLinkIcon , SP_ToolBarHorizontalExtensionButton ,
  SP_ToolBarVerticalExtensionButton , SP_FileDialogStart , SP_FileDialogEnd , SP_FileDialogToParent ,
  SP_FileDialogNewFolder , SP_FileDialogDetailedView , SP_FileDialogInfoView , SP_FileDialogContentsView ,
  SP_FileDialogListView , SP_FileDialogBack , SP_DirIcon , SP_DialogOkButton ,
  SP_DialogCancelButton , SP_DialogHelpButton , SP_DialogOpenButton , SP_DialogSaveButton ,
  SP_DialogCloseButton , SP_DialogApplyButton , SP_DialogResetButton , SP_DialogDiscardButton ,
  SP_DialogYesButton , SP_DialogNoButton , SP_ArrowUp , SP_ArrowDown ,
  SP_ArrowLeft , SP_ArrowRight , SP_ArrowBack , SP_ArrowForward ,
  SP_DirHomeIcon , SP_CommandLink , SP_VistaShield , SP_BrowserReload ,
  SP_BrowserStop , SP_MediaPlay , SP_MediaStop , SP_MediaPause ,
  SP_MediaSkipForward , SP_MediaSkipBackward , SP_MediaSeekForward , SP_MediaSeekBackward ,
  SP_MediaVolume , SP_MediaVolumeMuted , SP_LineEditClearButton , SP_DialogYesToAllButton ,
  SP_DialogNoToAllButton , SP_DialogSaveAllButton , SP_DialogAbortButton , SP_DialogRetryButton ,
  SP_DialogIgnoreButton , SP_RestoreDefaultsButton , SP_CustomBase = 0xf0000000
}
 

Public Member Functions

 QStyle ()
 Constructs a style object.
 
virtual ~QStyle ()
 Destroys the style object.
 
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 QRect subElementRect (SubElement subElement, const QStyleOption *option) const =0
 
virtual QRect subControlRect (ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc) const =0
 
virtual QSize sizeFromContents (ContentsType ct, const QStyleOption *opt, const QSize &contentsSize) const =0
 
virtual QFont font (ControlElement element, const QStyle::State state) const =0
 
virtual QMargins ninePatchMargins (ControlElement ce, const QStyleOption *opt, const QSize &imageSize) const =0
 
virtual QMargins ninePatchMargins (ComplexControl cc, const QStyleOptionComplex *opt, const QSize &imageSize) const =0
 
virtual SubControl hitTestComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt) const =0
 
virtual int pixelMetric (PixelMetric metric, const QStyleOption *option=nullptr) const =0
 
virtual int styleHint (StyleHint stylehint, const QStyleOption *opt=nullptr, QStyleHintReturn *returnData=nullptr) const =0
 
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 void drawPrimitive (PrimitiveElement pe, const QStyleOption *opt, QPainter *p) const =0
 
virtual void drawControl (ControlElement element, const QStyleOption *opt, QPainter *p) const =0
 
virtual void drawComplexControl (ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p) const =0
 
virtual QPalette standardPalette () const
 Returns the style's standard palette.
 
virtual QPixmap standardPixmap (StandardPixmap standardPixmap, const QStyleOption *opt=nullptr) const =0
 
virtual QIcon standardIcon (StandardPixmap standardIcon, const QStyleOption *option=nullptr) const =0
 
virtual QPixmap generatedIconPixmap (QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const =0
 
virtual void polish ()
 
const QStyleproxy () 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< QStringbindableObjectName ()
 
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).
 
QThreadthread () 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 >
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 >
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 QObjectListchildren () 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< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () 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
QObjectsender () 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)
 

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< QObjectDatad_ptr
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Detailed Description

Definition at line 28 of file qquickstyle.h.

Member Enumeration Documentation

◆ ComplexControl

Enumerator
CC_SpinBox 
CC_ComboBox 
CC_ScrollBar 
CC_Slider 
CC_ToolButton 
CC_TitleBar 
CC_Dial 
CC_GroupBox 
CC_MdiControls 
CC_CustomBase 

Definition at line 295 of file qquickstyle.h.

◆ ContentsType

Enumerator
CT_PushButton 
CT_CheckBox 
CT_RadioButton 
CT_ToolButton 
CT_ComboBox 
CT_Splitter 
CT_ProgressBar 
CT_MenuItem 
CT_MenuBarItem 
CT_MenuBar 
CT_Menu 
CT_TabBarTab 
CT_Slider 
CT_Dial 
CT_ScrollBar 
CT_LineEdit 
CT_SpinBox 
CT_SizeGrip 
CT_TabWidget 
CT_DialogButtons 
CT_HeaderSection 
CT_GroupBox 
CT_MdiControls 
CT_ItemViewItem 
CT_Frame 
CT_CustomBase 

Definition at line 509 of file qquickstyle.h.

◆ ControlElement

Enumerator
CE_PushButton 
CE_PushButtonBevel 
CE_PushButtonLabel 
CE_CheckBox 
CE_CheckBoxLabel 
CE_RadioButton 
CE_RadioButtonLabel 
CE_TabBarTab 
CE_TabBarTabShape 
CE_TabBarTabLabel 
CE_ProgressBar 
CE_ProgressBarGroove 
CE_ProgressBarContents 
CE_ProgressBarLabel 
CE_MenuItem 
CE_MenuScroller 
CE_MenuVMargin 
CE_MenuHMargin 
CE_MenuTearoff 
CE_MenuEmptyArea 
CE_MenuBarItem 
CE_MenuBarEmptyArea 
CE_ToolButtonLabel 
CE_Header 
CE_HeaderSection 
CE_HeaderLabel 
CE_ToolBoxTab 
CE_SizeGrip 
CE_Splitter 
CE_RubberBand 
CE_DockWidgetTitle 
CE_ScrollBarAddLine 
CE_ScrollBarSubLine 
CE_ScrollBarAddPage 
CE_ScrollBarSubPage 
CE_ScrollBarSlider 
CE_ScrollBarFirst 
CE_ScrollBarLast 
CE_FocusFrame 
CE_ComboBoxLabel 
CE_ToolBar 
CE_ToolBoxTabShape 
CE_ToolBoxTabLabel 
CE_HeaderEmptyArea 
CE_ColumnViewGrip 
CE_ItemViewItem 
CE_ShapedFrame 
CE_CustomBase 

Definition at line 142 of file qquickstyle.h.

◆ PixelMetric

Enumerator
PM_ButtonMargin 
PM_ButtonDefaultIndicator 
PM_MenuButtonIndicator 
PM_ButtonShiftHorizontal 
PM_ButtonShiftVertical 
PM_DefaultFrameWidth 
PM_SpinBoxFrameWidth 
PM_ComboBoxFrameWidth 
PM_MaximumDragDistance 
PM_ScrollBarExtent 
PM_ScrollBarSliderMin 
PM_SliderThickness 
PM_SliderControlThickness 
PM_SliderLength 
PM_SliderTickmarkOffset 
PM_SliderSpaceAvailable 
PM_DockWidgetSeparatorExtent 
PM_DockWidgetHandleExtent 
PM_DockWidgetFrameWidth 
PM_TabBarTabOverlap 
PM_TabBarTabHSpace 
PM_TabBarTabVSpace 
PM_TabBarBaseHeight 
PM_TabBarBaseOverlap 
PM_ProgressBarChunkWidth 
PM_SplitterWidth 
PM_TitleBarHeight 
PM_MenuScrollerHeight 
PM_MenuHMargin 
PM_MenuVMargin 
PM_MenuPanelWidth 
PM_MenuTearoffHeight 
PM_MenuDesktopFrameWidth 
PM_MenuBarPanelWidth 
PM_MenuBarItemSpacing 
PM_MenuBarVMargin 
PM_MenuBarHMargin 
PM_IndicatorWidth 
PM_IndicatorHeight 
PM_ExclusiveIndicatorWidth 
PM_ExclusiveIndicatorHeight 
PM_DialogButtonsSeparator 
PM_DialogButtonsButtonWidth 
PM_DialogButtonsButtonHeight 
PM_MdiSubWindowFrameWidth 
PM_MdiSubWindowMinimizedWidth 
PM_HeaderMargin 
PM_HeaderMarkSize 
PM_HeaderGripMargin 
PM_TabBarTabShiftHorizontal 
PM_TabBarTabShiftVertical 
PM_TabBarScrollButtonWidth 
PM_ToolBarFrameWidth 
PM_ToolBarHandleExtent 
PM_ToolBarItemSpacing 
PM_ToolBarItemMargin 
PM_ToolBarSeparatorExtent 
PM_ToolBarExtensionExtent 
PM_SpinBoxSliderHeight 
PM_DefaultTopLevelMargin 
PM_DefaultChildMargin 
PM_DefaultLayoutSpacing 
PM_ToolBarIconSize 
PM_ListViewIconSize 
PM_IconViewIconSize 
PM_SmallIconSize 
PM_LargeIconSize 
PM_FocusFrameVMargin 
PM_FocusFrameHMargin 
PM_ToolTipLabelFrameWidth 
PM_CheckBoxLabelSpacing 
PM_TabBarIconSize 
PM_SizeGripSize 
PM_DockWidgetTitleMargin 
PM_MessageBoxIconSize 
PM_ButtonIconSize 
PM_DockWidgetTitleBarButtonMargin 
PM_RadioButtonLabelSpacing 
PM_LayoutLeftMargin 
PM_LayoutTopMargin 
PM_LayoutRightMargin 
PM_LayoutBottomMargin 
PM_LayoutHorizontalSpacing 
PM_LayoutVerticalSpacing 
PM_TabBar_ScrollButtonOverlap 
PM_TextCursorWidth 
PM_TabCloseIndicatorWidth 
PM_TabCloseIndicatorHeight 
PM_ScrollView_ScrollBarSpacing 
PM_ScrollView_ScrollBarOverlap 
PM_SubMenuOverlap 
PM_TreeViewIndentation 
PM_HeaderDefaultSectionSizeHorizontal 
PM_HeaderDefaultSectionSizeVertical 
PM_TitleBarButtonIconSize 
PM_TitleBarButtonSize 
PM_PushButtonFocusFrameRadius 
PM_CheckBoxFocusFrameRadius 
PM_ComboBoxFocusFrameRadius 
PM_DialFocusFrameRadius 
PM_RadioButtonFocusFrameRadius 
PM_SliderFocusFrameRadius 
PM_SpinBoxFocusFrameRadius 
PM_TextAreaFocusFrameRadius 
PM_TextFieldFocusFrameRadius 
PM_CustomBase 

Definition at line 369 of file qquickstyle.h.

◆ PrimitiveElement

Enumerator
PE_Frame 
PE_FrameDefaultButton 
PE_FrameDockWidget 
PE_FrameFocusRect 
PE_FrameGroupBox 
PE_FrameLineEdit 
PE_FrameMenu 
PE_FrameStatusBarItem 
PE_FrameTabWidget 
PE_FrameWindow 
PE_FrameButtonBevel 
PE_FrameButtonTool 
PE_FrameTabBarBase 
PE_PanelButtonCommand 
PE_PanelButtonBevel 
PE_PanelButtonTool 
PE_PanelMenuBar 
PE_PanelToolBar 
PE_PanelLineEdit 
PE_IndicatorArrowDown 
PE_IndicatorArrowLeft 
PE_IndicatorArrowRight 
PE_IndicatorArrowUp 
PE_IndicatorBranch 
PE_IndicatorButtonDropDown 
PE_IndicatorItemViewItemCheck 
PE_IndicatorCheckBox 
PE_IndicatorDockWidgetResizeHandle 
PE_IndicatorHeaderArrow 
PE_IndicatorMenuCheckMark 
PE_IndicatorProgressChunk 
PE_IndicatorRadioButton 
PE_IndicatorSpinDown 
PE_IndicatorSpinMinus 
PE_IndicatorSpinPlus 
PE_IndicatorSpinUp 
PE_IndicatorToolBarHandle 
PE_IndicatorToolBarSeparator 
PE_PanelTipLabel 
PE_IndicatorTabTear 
PE_IndicatorTabTearLeft 
PE_PanelScrollAreaCorner 
PE_Widget 
PE_IndicatorColumnViewArrow 
PE_IndicatorItemViewItemDrop 
PE_PanelItemViewItem 
PE_PanelItemViewRow 
PE_PanelStatusBar 
PE_IndicatorTabClose 
PE_PanelMenu 
PE_IndicatorTabTearRight 
PE_CustomBase 

Definition at line 76 of file qquickstyle.h.

◆ RequestSoftwareInputPanel

Enumerator
RSIP_OnMouseClickAndAlreadyFocused 
RSIP_OnMouseClick 

Definition at line 540 of file qquickstyle.h.

◆ StandardPixmap

Enumerator
SP_TitleBarMenuButton 
SP_TitleBarMinButton 
SP_TitleBarMaxButton 
SP_TitleBarCloseButton 
SP_TitleBarNormalButton 
SP_TitleBarShadeButton 
SP_TitleBarUnshadeButton 
SP_TitleBarContextHelpButton 
SP_DockWidgetCloseButton 
SP_MessageBoxInformation 
SP_MessageBoxWarning 
SP_MessageBoxCritical 
SP_MessageBoxQuestion 
SP_DesktopIcon 
SP_TrashIcon 
SP_ComputerIcon 
SP_DriveFDIcon 
SP_DriveHDIcon 
SP_DriveCDIcon 
SP_DriveDVDIcon 
SP_DriveNetIcon 
SP_DirOpenIcon 
SP_DirClosedIcon 
SP_DirLinkIcon 
SP_DirLinkOpenIcon 
SP_FileIcon 
SP_FileLinkIcon 
SP_ToolBarHorizontalExtensionButton 
SP_ToolBarVerticalExtensionButton 
SP_FileDialogStart 
SP_FileDialogEnd 
SP_FileDialogToParent 
SP_FileDialogNewFolder 
SP_FileDialogDetailedView 
SP_FileDialogInfoView 
SP_FileDialogContentsView 
SP_FileDialogListView 
SP_FileDialogBack 
SP_DirIcon 
SP_DialogOkButton 
SP_DialogCancelButton 
SP_DialogHelpButton 
SP_DialogOpenButton 
SP_DialogSaveButton 
SP_DialogCloseButton 
SP_DialogApplyButton 
SP_DialogResetButton 
SP_DialogDiscardButton 
SP_DialogYesButton 
SP_DialogNoButton 
SP_ArrowUp 
SP_ArrowDown 
SP_ArrowLeft 
SP_ArrowRight 
SP_ArrowBack 
SP_ArrowForward 
SP_DirHomeIcon 
SP_CommandLink 
SP_VistaShield 
SP_BrowserReload 
SP_BrowserStop 
SP_MediaPlay 
SP_MediaStop 
SP_MediaPause 
SP_MediaSkipForward 
SP_MediaSkipBackward 
SP_MediaSeekForward 
SP_MediaSeekBackward 
SP_MediaVolume 
SP_MediaVolumeMuted 
SP_LineEditClearButton 
SP_DialogYesToAllButton 
SP_DialogNoToAllButton 
SP_DialogSaveAllButton 
SP_DialogAbortButton 
SP_DialogRetryButton 
SP_DialogIgnoreButton 
SP_RestoreDefaultsButton 
SP_CustomBase 

Definition at line 673 of file qquickstyle.h.

◆ StateFlag

Enumerator
State_None 
State_Enabled 
State_Raised 
State_Sunken 
State_Off 
State_NoChange 
State_On 
State_DownArrow 
State_Horizontal 
State_HasFocus 
State_Top 
State_Bottom 
State_FocusAtBorder 
State_AutoRaise 
State_MouseOver 
State_UpArrow 
State_Selected 
State_Active 
State_Window 
State_Open 
State_Children 
State_Item 
State_Sibling 
State_Editing 
State_KeyboardFocusChange 
State_ReadOnly 
State_Small 
State_Mini 

Definition at line 40 of file qquickstyle.h.

◆ StyleHint

Enumerator
SH_EtchDisabledText 
SH_DitherDisabledText 
SH_ScrollBar_MiddleClickAbsolutePosition 
SH_ScrollBar_ScrollWhenPointerLeavesControl 
SH_TabBar_SelectMouseType 
SH_TabBar_Alignment 
SH_Header_ArrowAlignment 
SH_Slider_SnapToValue 
SH_Slider_SloppyKeyEvents 
SH_ProgressDialog_CenterCancelButton 
SH_ProgressDialog_TextLabelAlignment 
SH_PrintDialog_RightAlignButtons 
SH_MainWindow_SpaceBelowMenuBar 
SH_FontDialog_SelectAssociatedText 
SH_Menu_AllowActiveAndDisabled 
SH_Menu_SpaceActivatesItem 
SH_Menu_SubMenuPopupDelay 
SH_ScrollView_FrameOnlyAroundContents 
SH_MenuBar_AltKeyNavigation 
SH_ComboBox_ListMouseTracking 
SH_Menu_MouseTracking 
SH_MenuBar_MouseTracking 
SH_ItemView_ChangeHighlightOnFocus 
SH_Widget_ShareActivation 
SH_Workspace_FillSpaceOnMaximize 
SH_ComboBox_Popup 
SH_TitleBar_NoBorder 
SH_Slider_StopMouseOverSlider 
SH_BlinkCursorWhenTextSelected 
SH_RichText_FullWidthSelection 
SH_Menu_Scrollable 
SH_GroupBox_TextLabelVerticalAlignment 
SH_GroupBox_TextLabelColor 
SH_Menu_SloppySubMenus 
SH_Table_GridLineColor 
SH_LineEdit_PasswordCharacter 
SH_DialogButtons_DefaultButton 
SH_ToolBox_SelectedPageTitleBold 
SH_TabBar_PreferNoArrows 
SH_ScrollBar_LeftClickAbsolutePosition 
SH_ListViewExpand_SelectMouseType 
SH_UnderlineShortcut 
SH_SpinBox_AnimateButton 
SH_SpinBox_KeyPressAutoRepeatRate 
SH_SpinBox_ClickAutoRepeatRate 
SH_Menu_FillScreenWithScroll 
SH_ToolTipLabel_Opacity 
SH_DrawMenuBarSeparator 
SH_TitleBar_ModifyNotification 
SH_Button_FocusPolicy 
SH_MessageBox_UseBorderForButtonSpacing 
SH_TitleBar_AutoRaise 
SH_ToolButton_PopupDelay 
SH_FocusFrame_Mask 
SH_RubberBand_Mask 
SH_WindowFrame_Mask 
SH_SpinControls_DisableOnBounds 
SH_Dial_BackgroundRole 
SH_ComboBox_LayoutDirection 
SH_ItemView_EllipsisLocation 
SH_ItemView_ShowDecorationSelected 
SH_ItemView_ActivateItemOnSingleClick 
SH_ScrollBar_ContextMenu 
SH_ScrollBar_RollBetweenButtons 
SH_Slider_AbsoluteSetButtons 
SH_Slider_PageSetButtons 
SH_Menu_KeyboardSearch 
SH_TabBar_ElideMode 
SH_DialogButtonLayout 
SH_ComboBox_PopupFrameStyle 
SH_MessageBox_TextInteractionFlags 
SH_DialogButtonBox_ButtonsHaveIcons 
SH_SpellCheckUnderlineStyle 
SH_MessageBox_CenterButtons 
SH_Menu_SelectionWrap 
SH_ItemView_MovementWithoutUpdatingSelection 
SH_ToolTip_Mask 
SH_FocusFrame_AboveWidget 
SH_TextControl_FocusIndicatorTextCharFormat 
SH_WizardStyle 
SH_ItemView_ArrowKeysNavigateIntoChildren 
SH_Menu_Mask 
SH_Menu_FlashTriggeredItem 
SH_Menu_FadeOutOnHide 
SH_SpinBox_ClickAutoRepeatThreshold 
SH_ItemView_PaintAlternatingRowColorsForEmptyArea 
SH_FormLayoutWrapPolicy 
SH_TabWidget_DefaultTabPosition 
SH_ToolBar_Movable 
SH_FormLayoutFieldGrowthPolicy 
SH_FormLayoutFormAlignment 
SH_FormLayoutLabelAlignment 
SH_ItemView_DrawDelegateFrame 
SH_TabBar_CloseButtonPosition 
SH_DockWidget_ButtonsHaveFrame 
SH_ToolButtonStyle 
SH_RequestSoftwareInputPanel 
SH_ScrollBar_Transient 
SH_Menu_SupportsSections 
SH_ToolTip_WakeUpDelay 
SH_ToolTip_FallAsleepDelay 
SH_Widget_Animate 
SH_Splitter_OpaqueResize 
SH_ComboBox_UseNativePopup 
SH_LineEdit_PasswordMaskDelay 
SH_TabBar_ChangeCurrentDelay 
SH_Menu_SubMenuUniDirection 
SH_Menu_SubMenuUniDirectionFailCount 
SH_Menu_SubMenuSloppySelectOtherActions 
SH_Menu_SubMenuSloppyCloseTimeout 
SH_Menu_SubMenuResetWhenReenteringParent 
SH_Menu_SubMenuDontStartSloppyOnLeave 
SH_ItemView_ScrollMode 
SH_TitleBar_ShowToolTipsOnButtons 
SH_Widget_Animation_Duration 
SH_ComboBox_AllowWheelScrolling 
SH_SpinBox_ButtonsInsideFrame 
SH_SpinBox_StepModifier 
SH_CustomBase 

Definition at line 546 of file qquickstyle.h.

◆ SubControl

Enumerator
SC_None 
SC_ScrollBarAddLine 
SC_ScrollBarSubLine 
SC_ScrollBarAddPage 
SC_ScrollBarSubPage 
SC_ScrollBarFirst 
SC_ScrollBarLast 
SC_ScrollBarSlider 
SC_ScrollBarGroove 
SC_SpinBoxUp 
SC_SpinBoxDown 
SC_SpinBoxFrame 
SC_SpinBoxEditField 
SC_ComboBoxFrame 
SC_ComboBoxEditField 
SC_ComboBoxArrow 
SC_ComboBoxListBoxPopup 
SC_SliderGroove 
SC_SliderHandle 
SC_SliderTickmarks 
SC_ToolButton 
SC_ToolButtonMenu 
SC_TitleBarSysMenu 
SC_TitleBarMinButton 
SC_TitleBarMaxButton 
SC_TitleBarCloseButton 
SC_TitleBarNormalButton 
SC_TitleBarShadeButton 
SC_TitleBarUnshadeButton 
SC_TitleBarContextHelpButton 
SC_TitleBarLabel 
SC_DialGroove 
SC_DialHandle 
SC_DialTickmarks 
SC_GroupBoxCheckBox 
SC_GroupBoxLabel 
SC_GroupBoxContents 
SC_GroupBoxFrame 
SC_MdiMinButton 
SC_MdiNormalButton 
SC_MdiCloseButton 
SC_CustomBase 
SC_All 

Definition at line 311 of file qquickstyle.h.

◆ SubElement

Enumerator
SE_PushButtonContents 
SE_PushButtonFocusRect 
SE_CheckBoxIndicator 
SE_CheckBoxContents 
SE_CheckBoxFocusRect 
SE_CheckBoxClickRect 
SE_RadioButtonIndicator 
SE_RadioButtonContents 
SE_RadioButtonFocusRect 
SE_RadioButtonClickRect 
SE_ComboBoxFocusRect 
SE_SliderFocusRect 
SE_ProgressBarGroove 
SE_ProgressBarContents 
SE_ProgressBarLabel 
SE_ToolBoxTabContents 
SE_HeaderLabel 
SE_HeaderArrow 
SE_TabWidgetTabBar 
SE_TabWidgetTabPane 
SE_TabWidgetTabContents 
SE_TabWidgetLeftCorner 
SE_TabWidgetRightCorner 
SE_ItemViewItemCheckIndicator 
SE_TabBarTearIndicator 
SE_TabBarTearIndicatorLeft 
SE_TreeViewDisclosureItem 
SE_LineEditContents 
SE_FrameContents 
SE_DockWidgetCloseButton 
SE_DockWidgetFloatButton 
SE_DockWidgetTitleBarText 
SE_DockWidgetIcon 
SE_CheckBoxLayoutItem 
SE_ComboBoxLayoutItem 
SE_DateTimeEditLayoutItem 
SE_LabelLayoutItem 
SE_ProgressBarLayoutItem 
SE_PushButtonLayoutItem 
SE_RadioButtonLayoutItem 
SE_SliderLayoutItem 
SE_ScrollBarLayoutItem 
SE_SpinBoxLayoutItem 
SE_ToolButtonLayoutItem 
SE_FrameLayoutItem 
SE_GroupBoxLayoutItem 
SE_TabWidgetLayoutItem 
SE_ItemViewItemDecoration 
SE_ItemViewItemText 
SE_ItemViewItemFocusRect 
SE_TabBarTabLeftButton 
SE_TabBarTabRightButton 
SE_TabBarTabText 
SE_ShapedFrameContents 
SE_ToolBarHandle 
SE_TabBarScrollLeftButton 
SE_TabBarScrollRightButton 
SE_TabBarTearIndicatorRight 
SE_CustomBase 

Definition at line 211 of file qquickstyle.h.

Constructor & Destructor Documentation

◆ QStyle() [1/2]

QStyle::QStyle ( QStylePrivate & dd)
protected

Constructs a style object.

Definition at line 41 of file qquickstyle.cpp.

References d.

◆ QStyle() [2/2]

QStyle::QStyle ( )

Constructs a style object.

Definition at line 29 of file qquickstyle.cpp.

References d.

◆ ~QStyle()

QStyle::~QStyle ( )
virtual

Destroys the style object.

Definition at line 51 of file qquickstyle.cpp.

Referenced by QQC2::QCommonStyle::drawControl().

+ Here is the caller graph for this function:

Member Function Documentation

◆ alignedRect()

QRect QStyle::alignedRect ( Qt::LayoutDirection direction,
Qt::Alignment alignment,
const QSize & size,
const QRect & rectangle )
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 227 of file qquickstyle.cpp.

References Qt::AlignBottom, Qt::AlignHCenter, alignment, Qt::AlignRight, Qt::AlignVCenter, direction, QRect::size(), visualAlignment(), QRect::x(), and QRect::y().

Referenced by QQC2::QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStyle::drawControl(), drawItemPixmap(), and QQC2::QCommonStyle::subControlRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawComplexControl()

virtual void QQC2::QStyle::drawComplexControl ( ComplexControl cc,
const QStyleOptionComplex * opt,
QPainter * p ) const
pure virtual

◆ drawControl()

virtual void QQC2::QStyle::drawControl ( ControlElement element,
const QStyleOption * opt,
QPainter * p ) const
pure virtual

Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), and QQC2::QCommonStyle::drawControl().

+ Here is the caller graph for this function:

◆ drawItemPixmap()

void QStyle::drawItemPixmap ( QPainter * painter,
const QRect & rectangle,
int alignment,
const QPixmap & pixmap ) const
virtual

Draws the given pixmap in the specified rectangle, according to the specified alignment, using the provided painter.

See also
drawItemText()

Definition at line 174 of file qquickstyle.cpp.

References aligned(), alignedRect(), alignment, QPainter::drawPixmap(), QRect::intersected(), QGuiApplication::layoutDirection, painter, pixmap, and rect.

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), and QQC2::QCommonStyle::drawPrimitive().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawItemText()

void QStyle::drawItemText ( QPainter * painter,
const QRect & rectangle,
int alignment,
const QPalette & palette,
bool enabled,
const QString & text,
QPalette::ColorRole textRole = QPalette::NoRole ) const
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.

See also
Qt::Alignment, drawItemPixmap()

Definition at line 136 of file qquickstyle.cpp.

References alignment, QPainter::background(), QPalette::brush(), QBrush::color(), Qt::Dense5Pattern, QPainter::drawText(), QPainter::fillRect(), QString::isEmpty(), QPalette::light(), QPalette::NoRole, painter, QPainter::pen(), proxy(), rect, QPainter::setPen(), SH_DitherDisabledText, SH_EtchDisabledText, styleHint(), and text.

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), and QQC2::QWindowsXPStyle::drawControl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawPrimitive()

◆ font()

virtual QFont QQC2::QStyle::font ( ControlElement element,
const QStyle::State state ) const
pure virtual

Implemented in QQC2::QCommonStyle.

◆ generatedIconPixmap()

virtual QPixmap QQC2::QStyle::generatedIconPixmap ( QIcon::Mode iconMode,
const QPixmap & pixmap,
const QStyleOption * opt ) const
pure virtual

Implemented in QQC2::QCommonStyle.

◆ hitTestComplexControl()

virtual SubControl QQC2::QStyle::hitTestComplexControl ( ComplexControl cc,
const QStyleOptionComplex * opt,
const QPoint & pt ) const
pure virtual

Implemented in QQC2::QCommonStyle.

◆ itemPixmapRect()

QRect QStyle::itemPixmapRect ( const QRect & r,
int flags,
const QPixmap & pixmap ) const
virtual

Returns the area within the given rectangle in which to draw the specified pixmap according to the defined alignment.

Definition at line 97 of file qquickstyle.cpp.

References Qt::AlignBottom, Qt::AlignHCenter, Qt::AlignLeft, alignment, Qt::AlignRight, Qt::AlignVCenter, QRect::getRect(), QGuiApplication::isRightToLeft(), pixmap, and rect.

Referenced by QQC2::QCommonStyle::subElementRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ itemTextRect()

QRect QStyle::itemTextRect ( const QFontMetrics & metrics,
const QRect & rectangle,
int alignment,
bool enabled,
const QString & text ) const
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.

See also
Qt::Alignment

Definition at line 73 of file qquickstyle.cpp.

References alignment, QRect::getRect(), QString::isEmpty(), proxy(), rect, SH_EtchDisabledText, styleHint(), and text.

Referenced by QQC2::QCommonStyle::subElementRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ninePatchMargins() [1/2]

virtual QMargins QQC2::QStyle::ninePatchMargins ( ComplexControl cc,
const QStyleOptionComplex * opt,
const QSize & imageSize ) const
pure virtual

◆ ninePatchMargins() [2/2]

virtual QMargins QQC2::QStyle::ninePatchMargins ( ControlElement ce,
const QStyleOption * opt,
const QSize & imageSize ) const
pure virtual

Implemented in QQC2::QCommonStyle.

◆ pixelMetric()

◆ polish()

virtual void QQC2::QStyle::polish ( )
inlinevirtual

Reimplemented in QQC2::QWindowsStyle.

Definition at line 784 of file qquickstyle.h.

◆ proxy()

◆ sizeFromContents()

virtual QSize QQC2::QStyle::sizeFromContents ( ContentsType ct,
const QStyleOption * opt,
const QSize & contentsSize ) const
pure virtual

◆ sliderPositionFromValue()

int QStyle::sliderPositionFromValue ( int min,
int max,
int logicalValue,
int span,
bool upsideDown = false )
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.

See also
sliderValueFromPosition()

Definition at line 276 of file qquickstyle.cpp.

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), and QQC2::QCommonStyle::subControlRect().

+ Here is the caller graph for this function:

◆ sliderValueFromPosition()

int QStyle::sliderValueFromPosition ( int min,
int max,
int position,
int span,
bool upsideDown = false )
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.

See also
sliderPositionFromValue()

Definition at line 319 of file qquickstyle.cpp.

References pos.

◆ standardIcon()

virtual QIcon QQC2::QStyle::standardIcon ( StandardPixmap standardIcon,
const QStyleOption * option = nullptr ) const
pure virtual

Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawControl(), and QQC2::QCommonStyle::subElementRect().

+ Here is the caller graph for this function:

◆ standardPalette()

QPalette QStyle::standardPalette ( ) const
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().

See also
QApplication::setPalette()

Reimplemented in QQC2::QWindowsXPStyle.

Definition at line 353 of file qquickstyle.cpp.

References QPalette::Base, Qt::black, QPalette::ButtonText, QColor::darker(), QPalette::Disabled, Qt::gray, QColor::lighter(), palette, QPalette::Text, Qt::white, and QPalette::WindowText.

Referenced by QQC2::QWindowsXPStyle::standardPalette().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ standardPixmap()

virtual QPixmap QQC2::QStyle::standardPixmap ( StandardPixmap standardPixmap,
const QStyleOption * opt = nullptr ) const
pure virtual

Implemented in QQC2::QCommonStyle, QQC2::QWindowsXPStyle, and QQC2::QWindowsStyle.

Referenced by QQC2::QCommonStyle::standardPixmap().

+ Here is the caller graph for this function:

◆ styleHint()

virtual int QQC2::QStyle::styleHint ( StyleHint stylehint,
const QStyleOption * opt = nullptr,
QStyleHintReturn * returnData = nullptr ) const
pure virtual

Implemented in QQC2::QWindowsStyle, QQC2::QWindowsXPStyle, and QQC2::QCommonStyle.

Referenced by QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), drawItemText(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), itemTextRect(), and QQC2::QCommonStyle::subControlRect().

+ Here is the caller graph for this function:

◆ subControlRect()

virtual QRect QQC2::QStyle::subControlRect ( ComplexControl cc,
const QStyleOptionComplex * opt,
SubControl sc ) const
pure virtual

◆ subElementRect()

virtual QRect QQC2::QStyle::subElementRect ( SubElement subElement,
const QStyleOption * option ) const
pure virtual

Implemented in QQC2::QCommonStyle, QQC2::QWindowsStyle, and QQC2::QWindowsXPStyle.

Referenced by QQC2::QCommonStyle::drawControl().

+ Here is the caller graph for this function:

◆ visualAlignment()

Qt::Alignment QStyle::visualAlignment ( Qt::LayoutDirection direction,
Qt::Alignment alignment )
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.

QWidget::layoutDirection

Definition at line 256 of file qquickstyle.cpp.

References alignment, direction, and QGuiApplicationPrivate::visualAlignment().

Referenced by alignedRect(), and QQC2::QCommonStyle::drawControl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ visualPos()

QPoint QStyle::visualPos ( Qt::LayoutDirection direction,
const QRect & boundingRectangle,
const QPoint & logicalPosition )
static

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

Definition at line 216 of file qquickstyle.cpp.

References boundingRect(), direction, Qt::LeftToRight, QPoint::x(), and QPoint::y().

+ Here is the call graph for this function:

◆ visualRect()

QRect QStyle::visualRect ( Qt::LayoutDirection direction,
const QRect & boundingRectangle,
const QRect & logicalRectangle )
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.

See also
QWidget::layoutDirection

Definition at line 197 of file qquickstyle.cpp.

References boundingRect(), direction, Qt::LeftToRight, rect, and QRect::translate().

Referenced by QQC2::QCommonStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QQC2::QCommonStyle::subControlRect(), QQC2::QWindowsXPStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QQC2::QWindowsStyle::subElementRect(), QQC2::QWindowsXPStyle::subElementRect(), and QQC2::QCommonStylePrivate::tabLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: