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
qstyleoption.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSTYLEOPTION_H
5#define QSTYLEOPTION_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtCore/qlocale.h>
9#include <QtCore/qvariant.h>
10#if QT_CONFIG(spinbox)
11#include <QtWidgets/qabstractspinbox.h>
12#endif
13#include <QtGui/qicon.h>
14#include <QtGui/qtransform.h>
15#if QT_CONFIG(slider)
16#include <QtWidgets/qslider.h>
17#endif
18#include <QtWidgets/qstyle.h>
19#if QT_CONFIG(tabbar)
20#include <QtWidgets/qtabbar.h>
21#endif
22#if QT_CONFIG(tabwidget)
23#include <QtWidgets/qtabwidget.h>
24#endif
25#if QT_CONFIG(rubberband)
26#include <QtWidgets/qrubberband.h>
27#endif
28#include <QtWidgets/qframe.h>
29#if QT_CONFIG(itemviews)
30# include <QtCore/qabstractitemmodel.h>
31#endif
32
34
35
36class QDebug;
37
38class Q_WIDGETS_EXPORT QStyleOption
39{
40public:
42 SO_Default, SO_FocusRect, SO_Button, SO_Tab, SO_MenuItem,
43 SO_Frame, SO_ProgressBar, SO_ToolBox, SO_Header,
44 SO_DockWidget, SO_ViewItem, SO_TabWidgetFrame,
45 SO_TabBarBase, SO_RubberBand, SO_ToolBar, SO_GraphicsItem,
46
47 SO_Complex = 0xf0000, SO_Slider, SO_SpinBox, SO_ToolButton, SO_ComboBox,
48 SO_TitleBar, SO_GroupBox, SO_SizeGrip,
49
50 SO_CustomBase = 0xf00,
51 SO_ComplexCustomBase = 0xf000000
52 };
53
54 enum StyleOptionType { Type = SO_Default };
56
58 int type;
59 QStyle::State state;
65
66 QStyleOption(int version = QStyleOption::Version, int type = SO_Default);
69
70 void initFrom(const QWidget *w);
71 QStyleOption &operator=(const QStyleOption &other);
72};
73
74class Q_WIDGETS_EXPORT QStyleOptionFocusRect : public QStyleOption
75{
76public:
77 enum StyleOptionType { Type = SO_FocusRect };
79
81
85
86protected:
87 QStyleOptionFocusRect(int version);
88};
89
90class Q_WIDGETS_EXPORT QStyleOptionFrame : public QStyleOption
91{
92public:
93 enum StyleOptionType { Type = SO_Frame };
95
99 None = 0x00,
100 Flat = 0x01,
101 Rounded = 0x02
102 };
103 Q_DECLARE_FLAGS(FrameFeatures, FrameFeature)
104 FrameFeatures features;
105 QFrame::Shape frameShape;
106
110
111protected:
112 QStyleOptionFrame(int version);
113};
114
115Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionFrame::FrameFeatures)
116
117#if QT_CONFIG(tabwidget)
118class Q_WIDGETS_EXPORT QStyleOptionTabWidgetFrame : public QStyleOption
119{
120public:
121 enum StyleOptionType { Type = SO_TabWidgetFrame };
122 enum StyleOptionVersion { Version = 1 };
123
124 int lineWidth;
125 int midLineWidth;
126 QTabBar::Shape shape;
127 QSize tabBarSize;
128 QSize rightCornerWidgetSize;
129 QSize leftCornerWidgetSize;
130 QRect tabBarRect;
131 QRect selectedTabRect;
132
133 QStyleOptionTabWidgetFrame();
134 inline QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame &other)
135 : QStyleOption(Version, Type) { *this = other; }
136 QStyleOptionTabWidgetFrame &operator=(const QStyleOptionTabWidgetFrame &) = default;
137
138protected:
139 QStyleOptionTabWidgetFrame(int version);
140};
141
142#endif // QT_CONFIG(tabwidget)
143
144
145#if QT_CONFIG(tabbar)
146class Q_WIDGETS_EXPORT QStyleOptionTabBarBase : public QStyleOption
147{
148public:
149 enum StyleOptionType { Type = SO_TabBarBase };
150 enum StyleOptionVersion { Version = 1 };
151
152 QTabBar::Shape shape;
153 QRect tabBarRect;
154 QRect selectedTabRect;
155 bool documentMode;
156
157 QStyleOptionTabBarBase();
158 QStyleOptionTabBarBase(const QStyleOptionTabBarBase &other) : QStyleOption(Version, Type) { *this = other; }
159 QStyleOptionTabBarBase &operator=(const QStyleOptionTabBarBase &) = default;
160
161protected:
162 QStyleOptionTabBarBase(int version);
163};
164
165#endif // QT_CONFIG(tabbar)
166
167class Q_WIDGETS_EXPORT QStyleOptionHeader : public QStyleOption
168{
169public:
170 enum StyleOptionType { Type = SO_Header };
172
173 enum SectionPosition { Beginning, Middle, End, OnlyOneSection };
174 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected,
175 NextAndPreviousAreSelected };
176 enum SortIndicator { None, SortUp, SortDown };
177
180 Qt::Alignment textAlignment;
182 Qt::Alignment iconAlignment;
187
191
192protected:
193 QStyleOptionHeader(int version);
194};
195
196// ### Qt7: merge with QStyleOptionHeader
197class Q_WIDGETS_EXPORT QStyleOptionHeaderV2 : public QStyleOptionHeader
198{
199public:
200 enum StyleOptionType { Type = SO_Header };
202
206
209 int unused:29;
210
211protected:
212 QStyleOptionHeaderV2(int version);
213};
214
215class Q_WIDGETS_EXPORT QStyleOptionButton : public QStyleOption
216{
217public:
218 enum StyleOptionType { Type = SO_Button };
220
221 enum ButtonFeature { None = 0x00, Flat = 0x01, HasMenu = 0x02, DefaultButton = 0x04,
222 AutoDefaultButton = 0x08, CommandLinkButton = 0x10 };
223 Q_DECLARE_FLAGS(ButtonFeatures, ButtonFeature)
224
225 ButtonFeatures features;
229
233
234protected:
235 QStyleOptionButton(int version);
236};
237
238Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionButton::ButtonFeatures)
239
240#if QT_CONFIG(tabbar)
241class Q_WIDGETS_EXPORT QStyleOptionTab : public QStyleOption
242{
243public:
244 enum StyleOptionType { Type = SO_Tab };
245 enum StyleOptionVersion { Version = 1 };
246
247 enum TabPosition { Beginning, Middle, End, OnlyOneTab, Moving };
248 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
249 enum CornerWidget { NoCornerWidgets = 0x00, LeftCornerWidget = 0x01,
250 RightCornerWidget = 0x02 };
251 enum TabFeature { None = 0x00, HasFrame = 0x01 };
252 Q_DECLARE_FLAGS(CornerWidgets, CornerWidget)
253 Q_DECLARE_FLAGS(TabFeatures, TabFeature)
254
255 QTabBar::Shape shape;
257 QIcon icon;
258 int row;
259 TabPosition position;
260 SelectedPosition selectedPosition;
261 CornerWidgets cornerWidgets;
263 bool documentMode;
264 QSize leftButtonSize;
265 QSize rightButtonSize;
266 TabFeatures features;
267 int tabIndex = -1;
268
269 QStyleOptionTab();
270 QStyleOptionTab(const QStyleOptionTab &other) : QStyleOption(Version, Type) { *this = other; }
271 QStyleOptionTab &operator=(const QStyleOptionTab &) = default;
272
273protected:
274 QStyleOptionTab(int version);
275};
276
277Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionTab::CornerWidgets)
278
279#endif // QT_CONFIG(tabbar)
280
281
282#if QT_CONFIG(toolbar)
283
284class Q_WIDGETS_EXPORT QStyleOptionToolBar : public QStyleOption
285{
286public:
287 enum StyleOptionType { Type = SO_ToolBar };
288 enum StyleOptionVersion { Version = 1 };
289 enum ToolBarPosition { Beginning, Middle, End, OnlyOne };
290 enum ToolBarFeature { None = 0x0, Movable = 0x1 };
291 Q_DECLARE_FLAGS(ToolBarFeatures, ToolBarFeature)
292 ToolBarPosition positionOfLine; // The toolbar line position
293 ToolBarPosition positionWithinLine; // The position within a toolbar
294 Qt::ToolBarArea toolBarArea; // The toolbar docking area
295 ToolBarFeatures features;
296 int lineWidth;
297 int midLineWidth;
298 QStyleOptionToolBar();
299 QStyleOptionToolBar(const QStyleOptionToolBar &other) : QStyleOption(Version, Type) { *this = other; }
300 QStyleOptionToolBar &operator=(const QStyleOptionToolBar &) = default;
301
302protected:
303 QStyleOptionToolBar(int version);
304};
305
306Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolBar::ToolBarFeatures)
307
308#endif // QT_CONFIG(toolbar)
309
310class Q_WIDGETS_EXPORT QStyleOptionProgressBar : public QStyleOption
311{
312public:
313 enum StyleOptionType { Type = SO_ProgressBar };
315
320 Qt::Alignment textAlignment;
324
328
329protected:
330 QStyleOptionProgressBar(int version);
331};
332
333class Q_WIDGETS_EXPORT QStyleOptionMenuItem : public QStyleOption
334{
335public:
336 enum StyleOptionType { Type = SO_MenuItem };
338
339 enum MenuItemType { Normal, DefaultItem, Separator, SubMenu, Scroller, TearOff, Margin,
340 EmptyArea };
341 enum CheckType { NotCheckable, Exclusive, NonExclusive };
342
353
357
358protected:
359 QStyleOptionMenuItem(int version);
360};
361
362class Q_WIDGETS_EXPORT QStyleOptionDockWidget : public QStyleOption
363{
364public:
365 enum StyleOptionType { Type = SO_DockWidget };
367
373
377
378protected:
379 QStyleOptionDockWidget(int version);
380};
381
382#if QT_CONFIG(itemviews)
383
384class Q_WIDGETS_EXPORT QStyleOptionViewItem : public QStyleOption
385{
386public:
387 enum StyleOptionType { Type = SO_ViewItem };
388 enum StyleOptionVersion { Version = 1 };
389
390 enum Position { Left, Right, Top, Bottom };
391
392 Qt::Alignment displayAlignment;
393 Qt::Alignment decorationAlignment;
394 Qt::TextElideMode textElideMode;
395 Position decorationPosition;
396 QSize decorationSize;
397 QFont font;
398 bool showDecorationSelected;
399
400 enum ViewItemFeature {
401 None = 0x00,
402 WrapText = 0x01,
403 Alternate = 0x02,
404 HasCheckIndicator = 0x04,
405 HasDisplay = 0x08,
406 HasDecoration = 0x10
407 };
408 Q_DECLARE_FLAGS(ViewItemFeatures, ViewItemFeature)
409
410 ViewItemFeatures features;
411
413 const QWidget *widget;
414
415 enum ViewItemPosition { Invalid, Beginning, Middle, End, OnlyOne };
416
419 QIcon icon;
421 ViewItemPosition viewItemPosition;
422 QBrush backgroundBrush;
423
424 QStyleOptionViewItem();
425 QStyleOptionViewItem(const QStyleOptionViewItem &other) : QStyleOption(Version, Type) { *this = other; }
426 QStyleOptionViewItem &operator=(const QStyleOptionViewItem &) = default;
427
428protected:
429 QStyleOptionViewItem(int version);
430};
431
432Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionViewItem::ViewItemFeatures)
433
434#endif // QT_CONFIG(itemviews)
435
436class Q_WIDGETS_EXPORT QStyleOptionToolBox : public QStyleOption
437{
438public:
439 enum StyleOptionType { Type = SO_ToolBox };
441
444
445 enum TabPosition { Beginning, Middle, End, OnlyOneTab };
446 enum SelectedPosition { NotAdjacent, NextIsSelected, PreviousIsSelected };
447
450
454
455protected:
456 QStyleOptionToolBox(int version);
457};
458
459#if QT_CONFIG(rubberband)
460class Q_WIDGETS_EXPORT QStyleOptionRubberBand : public QStyleOption
461{
462public:
463 enum StyleOptionType { Type = SO_RubberBand };
464 enum StyleOptionVersion { Version = 1 };
465
466 QRubberBand::Shape shape;
467 bool opaque;
468
469 QStyleOptionRubberBand();
470 QStyleOptionRubberBand(const QStyleOptionRubberBand &other) : QStyleOption(Version, Type) { *this = other; }
471 QStyleOptionRubberBand &operator=(const QStyleOptionRubberBand &) = default;
472
473protected:
474 QStyleOptionRubberBand(int version);
475};
476#endif // QT_CONFIG(rubberband)
477
478// -------------------------- Complex style options -------------------------------
479class Q_WIDGETS_EXPORT QStyleOptionComplex : public QStyleOption
480{
481public:
482 enum StyleOptionType { Type = SO_Complex };
484
485 QStyle::SubControls subControls;
486 QStyle::SubControls activeSubControls;
487
488 QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex);
491};
492
493#if QT_CONFIG(slider)
494class Q_WIDGETS_EXPORT QStyleOptionSlider : public QStyleOptionComplex
495{
496public:
497 enum StyleOptionType { Type = SO_Slider };
498 enum StyleOptionVersion { Version = 1 };
499
500 Qt::Orientation orientation;
501 int minimum;
502 int maximum;
503 QSlider::TickPosition tickPosition;
504 int tickInterval;
505 bool upsideDown;
506 int sliderPosition;
507 int sliderValue;
508 int singleStep;
509 int pageStep;
510 qreal notchTarget;
511 bool dialWrapping;
512 Qt::KeyboardModifiers keyboardModifiers;
513
514 QStyleOptionSlider();
515 QStyleOptionSlider(const QStyleOptionSlider &other) : QStyleOptionComplex(Version, Type) { *this = other; }
516 QStyleOptionSlider &operator=(const QStyleOptionSlider &) = default;
517
518protected:
519 QStyleOptionSlider(int version);
520};
521#endif // QT_CONFIG(slider)
522
523#if QT_CONFIG(spinbox)
524class Q_WIDGETS_EXPORT QStyleOptionSpinBox : public QStyleOptionComplex
525{
526public:
527 enum StyleOptionType { Type = SO_SpinBox };
528 enum StyleOptionVersion { Version = 1 };
529
531 QAbstractSpinBox::StepEnabled stepEnabled;
532 bool frame;
533
534 QStyleOptionSpinBox();
535 QStyleOptionSpinBox(const QStyleOptionSpinBox &other) : QStyleOptionComplex(Version, Type) { *this = other; }
536 QStyleOptionSpinBox &operator=(const QStyleOptionSpinBox &) = default;
537
538protected:
539 QStyleOptionSpinBox(int version);
540};
541#endif // QT_CONFIG(spinbox)
542
543class Q_WIDGETS_EXPORT QStyleOptionToolButton : public QStyleOptionComplex
544{
545public:
546 enum StyleOptionType { Type = SO_ToolButton };
548
549 enum ToolButtonFeature { None = 0x00, Arrow = 0x01, Menu = 0x04, MenuButtonPopup = Menu, PopupDelay = 0x08,
550 HasMenu = 0x10 };
551 Q_DECLARE_FLAGS(ToolButtonFeatures, ToolButtonFeature)
552
553 ToolButtonFeatures features;
557 Qt::ArrowType arrowType;
558 Qt::ToolButtonStyle toolButtonStyle;
561
565
566protected:
567 QStyleOptionToolButton(int version);
568};
569
570Q_DECLARE_OPERATORS_FOR_FLAGS(QStyleOptionToolButton::ToolButtonFeatures)
571
593
594class Q_WIDGETS_EXPORT QStyleOptionTitleBar : public QStyleOptionComplex
595{
596public:
597 enum StyleOptionType { Type = SO_TitleBar };
599
603 Qt::WindowFlags titleBarFlags;
604
608
609protected:
610 QStyleOptionTitleBar(int version);
611};
612
613class Q_WIDGETS_EXPORT QStyleOptionGroupBox : public QStyleOptionComplex
614{
615public:
616 enum StyleOptionType { Type = SO_GroupBox };
618
619 QStyleOptionFrame::FrameFeatures features;
621 Qt::Alignment textAlignment;
625
629protected:
630 QStyleOptionGroupBox(int version);
631};
632
647
648class Q_WIDGETS_EXPORT QStyleOptionGraphicsItem : public QStyleOption
649{
650public:
651 enum StyleOptionType { Type = SO_GraphicsItem };
653
655
659 static qreal levelOfDetailFromTransform(const QTransform &worldTransform);
660protected:
661 QStyleOptionGraphicsItem(int version);
662};
663
664template <typename T>
666{
667 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Opt;
668 if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type
669 || int(Opt::Type) == QStyleOption::SO_Default
670 || (int(Opt::Type) == QStyleOption::SO_Complex
672 return static_cast<T>(opt);
673 return nullptr;
674}
675
676template <typename T>
678{
679 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Opt;
680 if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type
681 || int(Opt::Type) == QStyleOption::SO_Default
682 || (int(Opt::Type) == QStyleOption::SO_Complex
684 return static_cast<T>(opt);
685 return nullptr;
686}
687
688// -------------------------- QStyleHintReturn -------------------------------
689class Q_WIDGETS_EXPORT QStyleHintReturn {
690public:
692 SH_Default=0xf000, SH_Mask, SH_Variant
693 };
694
695 enum StyleOptionType { Type = SH_Default };
697
698 QStyleHintReturn(int version = QStyleOption::Version, int type = SH_Default);
700
702 int type;
703};
704
705class Q_WIDGETS_EXPORT QStyleHintReturnMask : public QStyleHintReturn {
706public:
707 enum StyleOptionType { Type = SH_Mask };
709
712
714};
715
716class Q_WIDGETS_EXPORT QStyleHintReturnVariant : public QStyleHintReturn {
717public:
718 enum StyleOptionType { Type = SH_Variant };
720
723
725};
726
727template <typename T>
729{
730 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Opt;
731 if (hint && hint->version <= Opt::Version &&
732 (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default))
733 return static_cast<T>(hint);
734 return nullptr;
735}
736
737template <typename T>
739{
740 typedef typename std::remove_cv<typename std::remove_pointer<T>::type>::type Opt;
741 if (hint && hint->version <= Opt::Version &&
742 (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default))
743 return static_cast<T>(hint);
744 return nullptr;
745}
746
747#if !defined(QT_NO_DEBUG_STREAM)
748Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType);
749Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
750#endif
751
753
754#endif // QSTYLEOPTION_H
ButtonSymbols
This enum type describes the symbols that can be displayed on the buttons in a spin box.
\inmodule QtGui
Definition qbrush.h:30
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
\reentrant \inmodule QtGui
\reentrant
Definition qfont.h:22
The QFrame class is the base class of widgets that can have a frame.
Definition qframe.h:17
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
Shape
This enum specifies what shape a QRubberBand should have.
Definition qrubberband.h:22
\inmodule QtCore
Definition qsize.h:25
TickPosition
This enum specifies where the tick marks are to be drawn relative to the slider's groove and the hand...
Definition qslider.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QStyleHintReturnMask class provides style hints that return a QRegion.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
The QStyleHintReturnVariant class provides style hints that return a QVariant.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
\variable QStyleOptionGraphicsItem::exposedRect
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
HintReturnType
\value SH_Default QStyleHintReturn \value SH_Mask \l QStyle::SH_RubberBand_Mask QStyle::SH_FocusFrame...
\variable QStyleOptionHeaderV2::textElideMode
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionButton & operator=(const QStyleOptionButton &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
ButtonFeature
This enum describes the different types of features a push button can have.
\variable QStyleOptionToolButton::features
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionComboBox(const QStyleOptionComboBox &other)
Constructs a copy of the other style option.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionComboBox & operator=(const QStyleOptionComboBox &)=default
\variable QStyleOptionMenuItem::menuItemType
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionComplex(const QStyleOptionComplex &other)
Constructs a copy of the other style option.
QStyle::SubControls subControls
QStyleOptionComplex & operator=(const QStyleOptionComplex &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyle::SubControls activeSubControls
\variable QStyleOptionComplex::subControls
QStyleOptionDockWidget(const QStyleOptionDockWidget &other)
Constructs a copy of the other style option.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionDockWidget & operator=(const QStyleOptionDockWidget &)=default
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
\variable QStyleOption::palette
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFocusRect(const QStyleOptionFocusRect &other)
Constructs a copy of the other style option.
QStyleOptionFocusRect & operator=(const QStyleOptionFocusRect &)=default
\variable QStyleOptionFocusRect::backgroundColor
FrameFeature
\variable QStyleOptionFrame::lineWidth
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFrame & operator=(const QStyleOptionFrame &)=default
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
Constructs a copy of other.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionGraphicsItem & operator=(const QStyleOptionGraphicsItem &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
\variable QStyleOptionFrame::features
Qt::Alignment textAlignment
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionFrame::FrameFeatures features
QStyleOptionGroupBox & operator=(const QStyleOptionGroupBox &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionGroupBox(const QStyleOptionGroupBox &other)
Constructs a copy of the other style option.
The QStyleOptionHeaderV2 class is used to describe the parameters for drawing a header.
QStyleOptionHeaderV2 & operator=(const QStyleOptionHeaderV2 &)=default
QStyleOptionHeaderV2(const QStyleOptionHeaderV2 &other)
Qt::TextElideMode textElideMode
The QStyleOptionHeader class is used to describe the parameters for drawing a header.
SortIndicator
Indicates which direction the sort indicator should be drawn.
SectionPosition
\variable QStyleOptionHeader::section
SelectedPosition
This enum lets you know where the section's position is in relation to the selected section.
QStyleOptionHeader & operator=(const QStyleOptionHeader &)=default
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
SelectedPosition selectedPosition
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
Qt::Alignment iconAlignment
QStyleOptionHeader(const QStyleOptionHeader &other)
\variable QStyleOptionHeader::orientation
SectionPosition position
Qt::Orientation orientation
SortIndicator sortIndicator
Qt::Alignment textAlignment
\variable QStyleOptionProgressBar::minimum
QStyleOptionMenuItem & operator=(const QStyleOptionMenuItem &)=default
CheckType
This enum is used to indicate whether or not a check mark should be drawn for the item,...
MenuItemType
This enum indicates the type of menu item that the structure describes.
MenuItemType menuItemType
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionMenuItem(const QStyleOptionMenuItem &other)
Constructs a copy of the other style option.
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
\variable QStyleOptionButton::features
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionProgressBar(const QStyleOptionProgressBar &other)
Constructs a copy of the other style option.
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QStyleOptionProgressBar & operator=(const QStyleOptionProgressBar &)=default
Qt::Alignment textAlignment
QStyleOptionSizeGrip(int version)
QStyleOptionSizeGrip(const QStyleOptionSizeGrip &other)
QStyleOptionSizeGrip & operator=(const QStyleOptionSizeGrip &)=default
\variable QStyleOptionToolBox::selectedPosition
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionTitleBar & operator=(const QStyleOptionTitleBar &)=default
QStyleOptionTitleBar(const QStyleOptionTitleBar &other)
Constructs a copy of the other style option.
Qt::WindowFlags titleBarFlags
\variable QStyleOptionComboBox::editable
TabPosition
This enum describes tab positions relative to other tabs.
SelectedPosition
\variable QStyleOptionToolBox::icon
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
QStyleOptionToolBox & operator=(const QStyleOptionToolBox &)=default
QStyleOptionToolBox(const QStyleOptionToolBox &other)
Constructs a copy of the other style option.
SelectedPosition selectedPosition
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
\variable QStyleOptionDockWidget::title
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
ToolButtonFeature
Describes the various features that a tool button can have.
QStyleOptionToolButton & operator=(const QStyleOptionToolButton &)=default
The QStyleOption class stores the parameters used by QStyle functions.
OptionType
This enum is used internally by QStyleOption, its subclasses, and qstyleoption_cast() to determine th...
StyleOptionType
This enum is used to hold information about the type of the style option, and is defined for each QSt...
QFontMetrics fontMetrics
QStyle::State state
QPalette palette
QObject * styleObject
Qt::LayoutDirection direction
StyleOptionVersion
This enum is used to hold information about the version of the style option, and is defined for each ...
Shape
This enum type lists the built-in shapes supported by QTabBar.
Definition qtabbar.h:42
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
\inmodule QtCore
Definition qvariant.h:65
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
QString text
opt iconSize
opt initFrom(q)
[0]
QStyleOptionButton opt
@ OnlyOne
Definition qprint_p.h:96
@ Middle
Definition qprint_p.h:82
Q_QML_EXPORT QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName)
Provides locale specific properties and formatted data.
QVector3D minimum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
Definition qssgutils_p.h:54
QVector3D maximum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
Definition qssgutils_p.h:55
Combined button and popup list for selecting options.
Definition qcompare.h:63
CheckState
@ AlignVCenter
Definition qnamespace.h:155
@ AlignLeft
Definition qnamespace.h:144
ToolBarArea
LayoutDirection
Orientation
Definition qnamespace.h:98
TextElideMode
Definition qnamespace.h:188
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
@ None
Definition qhash.cpp:531
@ Invalid
GLfloat GLfloat GLfloat w
[0]
GLuint index
[2]
GLenum type
GLenum GLenum GLsizei void * row
GLuint GLenum option
@ Bottom
@ Top
@ Left
@ Right
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
Q_WIDGETS_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
T qstyleoption_cast(const QStyleOption *opt)
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]
QFrame frame
[0]
Definition moc.h:23