📄 qstyle.3qt
字号:
\fCQStyle::SH_FontDialog_SelectAssociatedText\fR - select the text in the line edit, or when selecting an item from the listbox, or when the line edit receives focus, like Windows..TP\fCQStyle::SH_PopupMenu_AllowActiveAndDisabled\fR - allows disabled menu items to be active..TP\fCQStyle::SH_PopupMenu_SpaceActivatesItem\fR - pressing Space activates the item, like Motif..TP\fCQStyle::SH_PopupMenu_SubMenuPopupDelay\fR - the number of milliseconds to wait before opening a submenu; 256 on windows, 96 on Motif..TP\fCQStyle::SH_PopupMenu_Scrollable\fR - whether popupmenu's must support scrolling..TP\fCQStyle::SH_PopupMenu_SloppySubMenus\fR - whether popupmenu's must support sloppy submenu; as implemented on Mac OS..TP\fCQStyle::SH_ScrollView_FrameOnlyAroundContents\fR - whether scrollviews draw their frame only around contents (like Motif), or around contents, scrollbars and corner widgets (like Windows)..TP\fCQStyle::SH_MenuBar_AltKeyNavigation\fR - menubars items are navigable by pressing Alt, followed by using the arrow keys to select the desired item..TP\fCQStyle::SH_ComboBox_ListMouseTracking\fR - mouse tracking in combobox dropdown lists..TP\fCQStyle::SH_PopupMenu_MouseTracking\fR - mouse tracking in popup menus..TP\fCQStyle::SH_MenuBar_MouseTracking\fR - mouse tracking in menubars..TP\fCQStyle::SH_ItemView_ChangeHighlightOnFocus\fR - gray out selected items when losing focus..TP\fCQStyle::SH_Widget_ShareActivation\fR - turn on sharing activation with floating modeless dialogs..TP\fCQStyle::SH_TabBar_SelectMouseType\fR - which type of mouse event should cause a tab to be selected..TP\fCQStyle::SH_ComboBox_Popup\fR - allows popups as a combobox dropdown menu..TP\fCQStyle::SH_Workspace_FillSpaceOnMaximize\fR - the workspace should maximize the client area..TP\fCQStyle::SH_TitleBar_NoBorder\fR - the titlebar has no border.TP\fCQStyle::SH_ScrollBar_StopMouseOverSlider\fR - stops autorepeat when slider reaches mouse.TP\fCQStyle::SH_BlinkCursorWhenTextSelected\fR - whether cursor should blink when text is selected.TP\fCQStyle::SH_RichText_FullWidthSelection\fR - whether richtext selections should extend the full width of the document..TP\fCQStyle::SH_GroupBox_TextLabelVerticalAlignment\fR - how to vertically align a groupbox's text label..TP\fCQStyle::SH_GroupBox_TextLabelColor\fR - how to paint a groupbox's text label..TP\fCQStyle::SH_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value..PPSee also styleHint()..SH "QStyle::StylePixmap"This enum represents a StylePixmap. A StylePixmap is a pixmap that can follow some existing GUI style or guideline..TP\fCQStyle::SP_TitleBarMinButton\fR - minimize button on titlebars. For example, in a QWorkspace..TP\fCQStyle::SP_TitleBarMaxButton\fR - maximize button on titlebars..TP\fCQStyle::SP_TitleBarCloseButton\fR - close button on titlebars..TP\fCQStyle::SP_TitleBarNormalButton\fR - normal (restore) button on titlebars..TP\fCQStyle::SP_TitleBarShadeButton\fR - shade button on titlebars..TP\fCQStyle::SP_TitleBarUnshadeButton\fR - unshade button on titlebars..TP\fCQStyle::SP_MessageBoxInformation\fR - the 'information' icon..TP\fCQStyle::SP_MessageBoxWarning\fR - the 'warning' icon..TP\fCQStyle::SP_MessageBoxCritical\fR - the 'critical' icon..TP\fCQStyle::SP_DockWindowCloseButton\fR - close button on dock windows; see also QDockWindow..TP\fCQStyle::SP_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value..PPSee also stylePixmap()..SH "QStyle::SubControl"This enum represents a SubControl within a ComplexControl..TP\fCQStyle::SC_None\fR - special value that matches no other SubControl..TP\fCQStyle::SC_ScrollBarAddLine\fR - scrollbar add line (i.e. down/right arrow); see also QScrollbar..TP\fCQStyle::SC_ScrollBarSubLine\fR - scrollbar sub line (i.e. up/left arrow)..TP\fCQStyle::SC_ScrollBarAddPage\fR - scrollbar add page (i.e. page down)..TP\fCQStyle::SC_ScrollBarSubPage\fR - scrollbar sub page (i.e. page up)..TP\fCQStyle::SC_ScrollBarFirst\fR - scrollbar first line (i.e. home)..TP\fCQStyle::SC_ScrollBarLast\fR - scrollbar last line (i.e. end)..TP\fCQStyle::SC_ScrollBarSlider\fR - scrollbar slider handle..TP\fCQStyle::SC_ScrollBarGroove\fR - special subcontrol which contains the area in which the slider handle may move..TP\fCQStyle::SC_SpinWidgetUp\fR - spinwidget up/increase; see also QSpinBox..TP\fCQStyle::SC_SpinWidgetDown\fR - spinwidget down/decrease..TP\fCQStyle::SC_SpinWidgetFrame\fR - spinwidget frame..TP\fCQStyle::SC_SpinWidgetEditField\fR - spinwidget edit field..TP\fCQStyle::SC_SpinWidgetButtonField\fR - spinwidget button field..TP\fCQStyle::SC_ComboBoxEditField\fR - combobox edit field; see also QComboBox..TP\fCQStyle::SC_ComboBoxArrow\fR - combobox arrow.TP\fCQStyle::SC_ComboBoxFrame\fR - combobox frame.TP\fCQStyle::SC_ComboBoxListBoxPopup\fR - combobox list box.TP\fCQStyle::SC_SliderGroove\fR - special subcontrol which contains the area in which the slider handle may move..TP\fCQStyle::SC_SliderHandle\fR - slider handle..TP\fCQStyle::SC_SliderTickmarks\fR - slider tickmarks..TP\fCQStyle::SC_ToolButton\fR - tool button; see also QToolbutton..TP\fCQStyle::SC_ToolButtonMenu\fR - subcontrol for opening a popup menu in a tool button; see also QPopupMenu..TP\fCQStyle::SC_TitleBarSysMenu\fR - system menu button (i.e. restore, close, etc.)..TP\fCQStyle::SC_TitleBarMinButton\fR - minimize button..TP\fCQStyle::SC_TitleBarMaxButton\fR - maximize button..TP\fCQStyle::SC_TitleBarCloseButton\fR - close button..TP\fCQStyle::SC_TitleBarLabel\fR - window title label..TP\fCQStyle::SC_TitleBarNormalButton\fR - normal (restore) button..TP\fCQStyle::SC_TitleBarShadeButton\fR - shade button..TP\fCQStyle::SC_TitleBarUnshadeButton\fR - unshade button..TP\fCQStyle::SC_ListView\fR - the list view area..TP\fCQStyle::SC_ListViewBranch\fR - (internal).TP\fCQStyle::SC_ListViewExpand\fR - expand item (i.e. show/hide child items)..TP\fCQStyle::SC_All\fR - special value that matches all SubControls..PPSee also ComplexControl..SH "QStyle::SubRect"This enum represents a sub-area of a widget. Style implementations would use these areas to draw the different parts of a widget..TP\fCQStyle::SR_PushButtonContents\fR - area containing the label (iconset with text or pixmap)..TP\fCQStyle::SR_PushButtonFocusRect\fR - area for the focus rect (usually larger than the contents rect)..TP\fCQStyle::SR_CheckBoxIndicator\fR - area for the state indicator (e.g. check mark)..TP\fCQStyle::SR_CheckBoxContents\fR - area for the label (text or pixmap)..TP\fCQStyle::SR_CheckBoxFocusRect\fR - area for the focus indicator..TP\fCQStyle::SR_RadioButtonIndicator\fR - area for the state indicator..TP\fCQStyle::SR_RadioButtonContents\fR - area for the label..TP\fCQStyle::SR_RadioButtonFocusRect\fR - area for the focus indicator..TP\fCQStyle::SR_ComboBoxFocusRect\fR - area for the focus indicator..TP\fCQStyle::SR_SliderFocusRect\fR - area for the focus indicator..TP\fCQStyle::SR_DockWindowHandleRect\fR - area for the tear-off handle..TP\fCQStyle::SR_ProgressBarGroove\fR - area for the groove..TP\fCQStyle::SR_ProgressBarContents\fR - area for the progress indicator..TP\fCQStyle::SR_ProgressBarLabel\fR - area for the text label..TP\fCQStyle::SR_ToolButtonContents\fR - area for the tool button's label..TP\fCQStyle::SR_CustomBase\fR - base value for custom ControlElements. All values above this are reserved for custom use. Therefore, custom values must be greater than this value..PPSee also subRect()..SH MEMBER FUNCTION DOCUMENTATION.SH "QStyle::QStyle ()"Constructs a QStyle..SH "QStyle::~QStyle ()\fC [virtual]\fR"Destroys the style and frees all allocated resources..SH "int QStyle::defaultFrameWidth () const"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QStyle::drawComplexControl ( ComplexControl control, QPainter * p, const QWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, SCFlags sub = SC_All, SCFlags subActive = SC_None, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR"Draws the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR. The \fIsub\fR argument specifies which SubControls to draw. Multiple SubControls can be OR'ed together. The \fIsubActive\fR argument specifies which SubControl is active..PPThe rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates when using drawPrimitive() and drawControl()..PPThe \fIhow\fR argument is used to control how the ComplexControl is drawn. Multiple flags can OR'ed together. See the table below for an explanation of which flags are used with the various ComplexControls..PPThe \fIwidget\fR argument is a pointer to a QWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIcontrol\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ComplexControl. Note that \fIopt\fR may be the default value even for ComplexControls that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage:.PP<center>.nf.TSl - l. ComplexControl.br& Widget Cast Style Flags Notes Options Notes CC_SpinWidget(const QSpinWidget *) Style_Enabled Set if the spinwidget is enabled. Unused. Style_HasFocus Set if the spinwidget has input focus. CC_ComboBox(const QComboBox *) Style_Enabled Set if the combobox is enabled. Unused. Style_HasFocus Set if the combobox has input focus. CC_ScrollBar(const QScrollBar *) Style_Enabled Set if the scrollbar is enabled. Unused. Style_HasFocus Set if the scrollbar has input focus. CC_Slider(const QSlider *) Style_Enabled Set if the slider is enabled. Unused. Style_HasFocus Set if the slider has input focus. CC_ToolButton(const QToolButton *) Style_Enabled Set if the toolbutton is enabled. QStyleOption ( ArrowType t ).TPopt.arrowType() When the tool button only contains an arrow, \fIt\fR is the arrow's type. Style_HasFocus Set if the toolbutton has input focus. Style_Down Set if the toolbutton is down (ie. mouse button or space pressed). Style_On Set if the toolbutton is a toggle button and is toggled on. Style_AutoRaise Set if the toolbutton has auto-raise enabled. Style_Raised Set if the button is not down, not on and doesn't contain the mouse when auto-raise is enabled. CC_TitleBar(const QWidget *) Style_Enabled Set if the titlebar is enabled. Unused. CC_ListView(const QListView *) Style_Enabled Set if the titlebar is enabled. QStyleOption ( QListViewItem *item ).TPopt.listViewItem().TE.fi</center>.PPSee also ComplexControl and SubControl..SH "void QStyle::drawComplexControlMask ( ComplexControl control, QPainter * p, const QWidget * widget, const QRect & r, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR"Draw a bitmask for the ComplexControl \fIcontrol\fR using the painter \fIp\fR in the area \fIr\fR. See drawComplexControl() for an explanation of the use of the \fIwidget\fR and \fIopt\fR arguments..PPThe rect \fIr\fR should be in logical coordinates. Reimplementations of this function should use visualRect() to change the logical corrdinates into screen coordinates when using drawPrimitive() and drawControl()..PPSee also drawComplexControl() and ComplexControl..SH "void QStyle::drawControl ( ControlElement element, QPainter * p, const QWidget * widget, const QRect & r, const QColorGroup & cg, SFlags how = Style_Default, const QStyleOption & opt = QStyleOption::Default ) const\fC [pure virtual]\fR"Draws the ControlElement \fIelement\fR using the painter \fIp\fR in the area \fIr\fR. Colors are used from the color group \fIcg\fR..PPThe rect \fIr\fR should be in screen coordinates..PPThe \fIhow\fR argument is used to control how the ControlElement is drawn. Multiple flags can be OR'ed together. See the table below for an explanation of which flags are used with the various ControlElements..PPThe \fIwidget\fR argument is a pointer to a QWidget or one of its subclasses. The widget can be cast to the appropriate type based on the value of \fIelement\fR. The \fIopt\fR argument can be used to pass extra information required when drawing the ControlElement. Note that \fIopt\fR may be the default value even for ControlElements that can make use of the extra options. See the table below for the appropriate \fIwidget\fR and \fIopt\fR usage:.PP<center>.nf.TSl - l. ControlElement.br& Widget Cast Style Flags Notes Options Notes CE_PushButton(const QPushButton *).PPand.PPCE_PushButtonLabel(const QPushButton *) Style_Enabled Set if the button is enabled. Unused. Style_HasFocus Set if the button has input focus. Style_Raised Set if the button is not down, not on and not flat. Style_On Set if the button is a toggle button and toggled on. Style_Down Set if the button is down (i.e., the mouse button or space bar is pressed on the button). Style_ButtonDefault Set if the button is a default button. CE_CheckBox(const QCheckBox *).PPand.PPCE_CheckBoxLabel(const QCheckBox *).PP Style_Enabled Set if the checkbox is enabled. Unused.Style_HasFocus Set if the checkbox has input focus. Style_On Set if the checkbox is checked. Style_Off Set if the checkbox is not checked. Style_NoChange Set if the checkbox is in the NoChange state. Style_Down Set if the checkbox is down (i.e., the mouse button or space bar is pressed on the button). CE_RadioButton(const QRadioButton *).PPand.PPCE_RadioButtonLabel(const QRadioButton *) Style_Enabled Set if the radiobutton is enabled. Unused. Style_HasFocus Set if the radiobutton has input focus. Style_On Set if the radiobutton is checked. Style_Off Set if the radiobutton is not checked. Style_Down Set if the radiobutton is down (i.e., the mouse button or space bar is pressed on the radiobutton). CE_TabBarTab(const QTabBar *).PPand.PPCE_TabBarLabel(const QTabBar *).PP Style_Enabled Set if the tabbar and tab is enabled. QStyleOption ( QTab *t )
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -