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
qstylehelper.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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#include <qstyleoption.h>
5#include <qpainter.h>
6#include <qpixmapcache.h>
7#include <private/qhighdpiscaling_p.h>
8#include <private/qguiapplication_p.h>
9#include <private/qmath_p.h>
10#include <private/qstyle_p.h>
11#include <qmath.h>
12#if QT_CONFIG(scrollbar)
13#include <qscrollbar.h>
14#endif
15#include <qabstractscrollarea.h>
16#include <qwindow.h>
17
18#include <qmetaobject.h>
19#include "qstylehelper_p.h"
20#include <qstringbuilder.h>
21
23
24Q_GUI_EXPORT int qt_defaultDpiX();
25
26namespace QStyleHelper {
27
28static inline bool usePixmapCache(const QStyleOption *opt)
29{
30 if (QWidget *widget = qobject_cast<QWidget *>(opt->styleObject))
32 return true;
33}
34
36{
38 return {};
39
40 const QStyleOptionComplex *complexOption = qstyleoption_cast<const QStyleOptionComplex *>(option);
41 QString tmp = key % HexString<uint>(option->state)
42 % HexString<uint>(option->direction)
43 % HexString<uint>(complexOption ? uint(complexOption->activeSubControls) : 0u)
44 % HexString<quint64>(option->palette.cacheKey())
45 % HexString<uint>(size.width())
46 % HexString<uint>(size.height())
47 % HexString<qreal>(dpr);
48
49#if QT_CONFIG(spinbox)
50 if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
51 tmp = tmp % HexString<uint>(spinBox->buttonSymbols)
52 % HexString<uint>(spinBox->stepEnabled)
53 % QChar(spinBox->frame ? u'1' : u'0');
54 }
55#endif // QT_CONFIG(spinbox)
56
57 return tmp;
58}
59
60#ifdef Q_OS_DARWIN
61static const qreal qstyleBaseDpi = 72;
62#else
63static const qreal qstyleBaseDpi = 96;
64#endif
65
66Q_WIDGETS_EXPORT qreal dpi(const QStyleOption *option)
67{
68#ifndef Q_OS_DARWIN
69 // Prioritize the application override, except for on macOS where
70 // we have historically not supported the AA_Use96Dpi flag.
72 return 96;
73#endif
74
75 // Expect that QStyleOption::QFontMetrics::QFont has the correct DPI set
76 if (option)
77 return option->fontMetrics.fontDpi();
78
79 // Fall back to historical Qt behavior: hardocded 72 DPI on mac,
80 // primary screen DPI on other platforms.
81#ifdef Q_OS_DARWIN
82 return qstyleBaseDpi;
83#else
84 return qt_defaultDpiX();
85#endif
86}
87
88Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, qreal dpi)
89{
90 return value * dpi / qstyleBaseDpi;
91}
92
93Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, const QPaintDevice *device)
94{
95 return dpiScaled(value, device->logicalDpiX());
96}
97
98Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, const QStyleOption *option)
99{
100 return dpiScaled(value, dpi(option));
101}
102
103#if QT_CONFIG(accessibility)
104bool isInstanceOf(QObject *obj, QAccessible::Role role)
105{
106 bool match = false;
107 QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj);
108 match = iface && iface->role() == role;
109 return match;
110}
111
112// Searches for an ancestor of a particular accessible role
113bool hasAncestor(QObject *obj, QAccessible::Role role)
114{
115 bool found = false;
116 QObject *parent = obj ? obj->parent() : nullptr;
117 while (parent && !found) {
118 if (isInstanceOf(parent, role))
119 found = true;
120 parent = parent->parent();
121 }
122 return found;
123}
124#endif // QT_CONFIG(accessibility)
125
126
127#if QT_CONFIG(dial)
128
129int calcBigLineSize(int radius)
130{
131 int bigLineSize = radius / 6;
132 if (bigLineSize < 4)
133 bigLineSize = 4;
134 if (bigLineSize > radius / 2)
135 bigLineSize = radius / 2;
136 return bigLineSize;
137}
138
139static QPointF calcRadialPos(const QStyleOptionSlider *dial, qreal offset)
140{
141 const int width = dial->rect.width();
142 const int height = dial->rect.height();
143 const int r = qMin(width, height) / 2;
144 const int currentSliderPosition = dial->upsideDown ? dial->sliderPosition : (dial->maximum - dial->sliderPosition);
145 qreal a = 0;
146 if (dial->maximum == dial->minimum)
147 a = Q_PI / 2;
148 else if (dial->dialWrapping)
149 a = Q_PI * 3 / 2 - (currentSliderPosition - dial->minimum) * 2 * Q_PI
150 / (dial->maximum - dial->minimum);
151 else
152 a = (Q_PI * 8 - (currentSliderPosition - dial->minimum) * 10 * Q_PI
153 / (dial->maximum - dial->minimum)) / 6;
154 qreal xc = width / 2.0;
155 qreal yc = height / 2.0;
156 qreal len = r - QStyleHelper::calcBigLineSize(r) - 3;
157 qreal back = offset * len;
158 QPointF pos(QPointF(xc + back * qCos(a), yc - back * qSin(a)));
159 return pos + dial->rect.topLeft();
160}
161
162qreal angle(const QPointF &p1, const QPointF &p2)
163{
164 static const qreal rad_factor = 180 / Q_PI;
165 qreal _angle = 0;
166
167 if (p1.x() == p2.x()) {
168 if (p1.y() < p2.y())
169 _angle = 270;
170 else
171 _angle = 90;
172 } else {
173 qreal x1, x2, y1, y2;
174
175 if (p1.x() <= p2.x()) {
176 x1 = p1.x(); y1 = p1.y();
177 x2 = p2.x(); y2 = p2.y();
178 } else {
179 x2 = p1.x(); y2 = p1.y();
180 x1 = p2.x(); y1 = p2.y();
181 }
182
183 qreal m = -(y2 - y1) / (x2 - x1);
184 _angle = qAtan(m) * rad_factor;
185
186 if (p1.x() < p2.x())
187 _angle = 180 - _angle;
188 else
189 _angle = -_angle;
190 }
191 return _angle;
192}
193
194QPolygonF calcLines(const QStyleOptionSlider *dial)
195{
196 QPolygonF poly;
197 int width = dial->rect.width();
198 int height = dial->rect.height();
199 qreal r = qMin(width, height) / 2;
200 int bigLineSize = calcBigLineSize(int(r));
201
202 qreal xc = width / 2 + 0.5;
203 qreal yc = height / 2 + 0.5;
204 const int ns = dial->tickInterval;
205 if (!ns) // Invalid values may be set by Qt Widgets Designer.
206 return poly;
207 int notches = (dial->maximum + ns - 1 - dial->minimum) / ns;
208 if (notches <= 0)
209 return poly;
210 if (dial->maximum < dial->minimum || dial->maximum - dial->minimum > 1000) {
211 int maximum = dial->minimum + 1000;
212 notches = (maximum + ns - 1 - dial->minimum) / ns;
213 }
214
215 poly.resize(2 + 2 * notches);
216 int smallLineSize = bigLineSize / 2;
217 for (int i = 0; i <= notches; ++i) {
218 qreal angle = dial->dialWrapping ? Q_PI * 3 / 2 - i * 2 * Q_PI / notches
219 : (Q_PI * 8 - i * 10 * Q_PI / notches) / 6;
220 qreal s = qSin(angle);
221 qreal c = qCos(angle);
222 if (i == 0 || (((ns * i) % (dial->pageStep ? dial->pageStep : 1)) == 0)) {
223 poly[2 * i] = QPointF(xc + (r - bigLineSize) * c,
224 yc - (r - bigLineSize) * s);
225 poly[2 * i + 1] = QPointF(xc + r * c, yc - r * s);
226 } else {
227 poly[2 * i] = QPointF(xc + (r - 1 - smallLineSize) * c,
228 yc - (r - 1 - smallLineSize) * s);
229 poly[2 * i + 1] = QPointF(xc + (r - 1) * c, yc -(r - 1) * s);
230 }
231 }
232 return poly.translated(dial->rect.topLeft());
233}
234
235// This will draw a nice and shiny QDial for us. We don't want
236// all the shinyness in QWindowsStyle, hence we place it here
237
238void drawDial(const QStyleOptionSlider *option, QPainter *painter)
239{
240 const QPalette pal = option->palette;
241 QColor buttonColor = pal.button().color();
242 const int width = option->rect.width();
243 const int height = option->rect.height();
244 const bool enabled = option->state & QStyle::State_Enabled;
245 qreal r = qMin(width, height) / 2;
246 r -= r/50;
247 const qreal penSize = r/20.0;
248
249 painter->save();
251
252 // Draw notches
253 if (option->subControls & QStyle::SC_DialTickmarks) {
254 const bool inverted = pal.window().color().lightness() < pal.text().color().lightness()
255 && pal.light().color().lightness() > pal.dark().color().lightness();
256 const QColor notchColor = inverted ? pal.light().color().lighter(120)
257 : pal.dark().color().darker(120);
258 painter->setPen(notchColor);
259 painter->drawLines(QStyleHelper::calcLines(option));
260 }
261
262 // setting color before BEGIN_STYLE_PIXMAPCACHE since
263 // otherwise it is not set when the image is in the cache
264 buttonColor.setHsv(buttonColor .hue(),
265 qMin(140, buttonColor .saturation()),
266 qMax(180, buttonColor.value()));
267
268 // Cache dial background
270 p->setRenderHint(QPainter::Antialiasing);
271
272 const qreal d_ = r / 6;
273 const qreal dx = d_ + (width - 2 * r) / 2 + 1;
274 const qreal dy = d_ + (height - 2 * r) / 2 + 1;
275
276 QRectF br = QRectF(dx + 0.5, dy + 0.5,
277 int(r * 2 - 2 * d_ - 2),
278 int(r * 2 - 2 * d_ - 2));
279
280 if (enabled) {
281 // Drop shadow
282 qreal shadowSize = qMax(1.0, penSize/2.0);
283 QRectF shadowRect= br.adjusted(-2*shadowSize, -2*shadowSize,
284 2*shadowSize, 2*shadowSize);
285 QRadialGradient shadowGradient(shadowRect.center().x(),
286 shadowRect.center().y(), shadowRect.width()/2.0,
287 shadowRect.center().x(), shadowRect.center().y());
288 shadowGradient.setColorAt(qreal(0.91), QColor(0, 0, 0, 40));
289 shadowGradient.setColorAt(qreal(1.0), Qt::transparent);
290 p->setBrush(shadowGradient);
291 p->setPen(Qt::NoPen);
292 p->translate(shadowSize, shadowSize);
293 p->drawEllipse(shadowRect);
294 p->translate(-shadowSize, -shadowSize);
295
296 // Main gradient
297 QRadialGradient gradient(br.center().x() - br.width()/3, dy,
298 br.width()*1.3, br.center().x(),
299 br.center().y() - br.height()/2);
300 gradient.setColorAt(0, buttonColor.lighter(110));
301 gradient.setColorAt(qreal(0.5), buttonColor);
302 gradient.setColorAt(qreal(0.501), buttonColor.darker(102));
303 gradient.setColorAt(1, buttonColor.darker(115));
304 p->setBrush(gradient);
305 } else {
306 p->setBrush(Qt::NoBrush);
307 }
308
309 p->setPen(QPen(buttonColor.darker(280)));
310 p->drawEllipse(br);
311 p->setBrush(Qt::NoBrush);
312 p->setPen(buttonColor.lighter(110));
313 p->drawEllipse(br.adjusted(1, 1, -1, -1));
314
315 if (option->state & QStyle::State_HasFocus) {
316 QColor highlight = pal.highlight().color();
317 highlight.setHsv(highlight.hue(),
318 qMin(160, highlight.saturation()),
319 qMax(230, highlight.value()));
320 highlight.setAlpha(127);
321 p->setPen(QPen(highlight, 2.0));
322 p->setBrush(Qt::NoBrush);
323 p->drawEllipse(br.adjusted(-1, -1, 1, 1));
324 }
325
327
328 QPointF dp = calcRadialPos(option, qreal(0.70));
329 buttonColor = buttonColor.lighter(104);
330 buttonColor.setAlphaF(0.8f);
331 const qreal ds = r/qreal(7.0);
332 QRectF dialRect(dp.x() - ds, dp.y() - ds, 2*ds, 2*ds);
333 QRadialGradient dialGradient(dialRect.center().x() + dialRect.width()/2,
334 dialRect.center().y() + dialRect.width(),
335 dialRect.width()*2,
336 dialRect.center().x(), dialRect.center().y());
337 dialGradient.setColorAt(1, buttonColor.darker(140));
338 dialGradient.setColorAt(qreal(0.4), buttonColor.darker(120));
339 dialGradient.setColorAt(0, buttonColor.darker(110));
340 if (penSize > 3.0) {
341 painter->setPen(QPen(QColor(0, 0, 0, 25), penSize));
342 painter->drawLine(calcRadialPos(option, qreal(0.90)), calcRadialPos(option, qreal(0.96)));
343 }
344
345 painter->setBrush(dialGradient);
346 painter->setPen(QColor(255, 255, 255, 150));
347 painter->drawEllipse(dialRect.adjusted(-1, -1, 1, 1));
348 painter->setPen(QColor(0, 0, 0, 80));
349 painter->drawEllipse(dialRect);
350 painter->restore();
351}
352#endif //QT_CONFIG(dial)
353
355 int left, int top, int right,
356 int bottom)
357{
358 QSize size = pixmap.size();
359 //painter->setRenderHint(QPainter::SmoothPixmapTransform);
360
361 //top
362 if (top > 0) {
363 painter->drawPixmap(QRect(rect.left() + left, rect.top(), rect.width() -right - left, top), pixmap,
364 QRect(left, 0, size.width() -right - left, top));
365
366 //top-left
367 if (left > 0)
368 painter->drawPixmap(QRect(rect.left(), rect.top(), left, top), pixmap,
369 QRect(0, 0, left, top));
370
371 //top-right
372 if (right > 0)
373 painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top(), right, top), pixmap,
374 QRect(size.width() - right, 0, right, top));
375 }
376
377 //left
378 if (left > 0)
379 painter->drawPixmap(QRect(rect.left(), rect.top()+top, left, rect.height() - top - bottom), pixmap,
380 QRect(0, top, left, size.height() - bottom - top));
381
382 //center
383 painter->drawPixmap(QRect(rect.left() + left, rect.top()+top, rect.width() -right - left,
384 rect.height() - bottom - top), pixmap,
385 QRect(left, top, size.width() -right -left,
386 size.height() - bottom - top));
387 //right
388 if (right > 0)
389 painter->drawPixmap(QRect(rect.left() +rect.width() - right, rect.top()+top, right, rect.height() - top - bottom), pixmap,
390 QRect(size.width() - right, top, right, size.height() - bottom - top));
391
392 //bottom
393 if (bottom > 0) {
394 painter->drawPixmap(QRect(rect.left() +left, rect.top() + rect.height() - bottom,
395 rect.width() - right - left, bottom), pixmap,
396 QRect(left, size.height() - bottom,
397 size.width() - right - left, bottom));
398 //bottom-left
399 if (left > 0)
400 painter->drawPixmap(QRect(rect.left(), rect.top() + rect.height() - bottom, left, bottom), pixmap,
401 QRect(0, size.height() - bottom, left, bottom));
402
403 //bottom-right
404 if (right > 0)
405 painter->drawPixmap(QRect(rect.left() + rect.width() - right, rect.top() + rect.height() - bottom, right, bottom), pixmap,
406 QRect(size.width() - right, size.height() - bottom, right, bottom));
407
408 }
409}
410
412{
413#if QT_CONFIG(scrollarea)
414 if (qobject_cast<const QScrollBar *>(widget) && widget->parent() &&
415 qobject_cast<const QAbstractScrollArea *>(widget->parent()->parent()))
417#else
419#endif
420 return pal.color(QPalette::Base);
421}
422
424{
425 while (widget) {
427 return SizeMini;
429 return SizeSmall;
431 return SizeLarge;
432 }
434 }
435
437 return SizeMini;
438 else if (opt && opt->state & QStyle::State_Small)
439 return SizeSmall;
440
441 return SizeDefault;
442}
443
444}
IOBluetoothDevice * device
bool frame
whether the spin box draws itself with a frame
ButtonSymbols buttonSymbols
the current button symbol mode
virtual StepEnabled stepEnabled() const
Virtual function that determines whether stepping up and down is legal at any given time.
const QColor & color() const
Returns the brush color.
Definition qbrush.h:121
\inmodule QtCore
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
int saturation() const noexcept
Returns the HSV saturation color component of this color.
Definition qcolor.cpp:1734
void setAlphaF(float alpha)
Sets the alpha of this color to alpha.
Definition qcolor.cpp:1511
QColor darker(int f=200) const noexcept
Definition qcolor.cpp:2857
int lightness() const noexcept
Definition qcolor.cpp:1860
int hue() const noexcept
Returns the HSV hue color component of this color.
Definition qcolor.cpp:1708
void setAlpha(int alpha)
Sets the alpha of this color to alpha.
Definition qcolor.cpp:1481
void setHsv(int h, int s, int v, int a=255)
Sets a HSV color value; h is the hue, s is the saturation, v is the value and a is the alpha componen...
Definition qcolor.cpp:1099
int value() const noexcept
Returns the value color component of this color.
Definition qcolor.cpp:1756
QColor lighter(int f=150) const noexcept
Definition qcolor.cpp:2812
static bool testAttribute(Qt::ApplicationAttribute attribute)
Returns true if attribute attribute is set; otherwise returns false.
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void drawLine(const QLineF &line)
Draws a line defined by line.
Definition qpainter.h:442
void restore()
Restores the current painter state (pops a saved state off the stack).
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
void save()
Saves the current painter state (pushes the state onto a stack).
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device.
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
@ Antialiasing
Definition qpainter.h:52
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint.
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
const QBrush & highlight() const
Returns the highlight brush of the current color group.
Definition qpalette.h:98
const QBrush & button() const
Returns the button brush of the current color group.
Definition qpalette.h:84
const QBrush & text() const
Returns the text foreground brush of the current color group.
Definition qpalette.h:88
const QBrush & dark() const
Returns the dark brush of the current color group.
Definition qpalette.h:86
const QBrush & light() const
Returns the light brush of the current color group.
Definition qpalette.h:85
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
Definition qpalette.h:67
const QBrush & window() const
Returns the window (general background) brush of the current color group.
Definition qpalette.h:93
\inmodule QtGui
Definition qpen.h:28
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QPolygonF class provides a list of points using floating point precision.
Definition qpolygon.h:96
\inmodule QtGui
Definition qbrush.h:412
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5871
\variable QStyleOptionMenuItem::menuItemType
The QStyleOption class stores the parameters used by QStyle functions.
QStyle::State state
QObject * styleObject
@ State_HasFocus
Definition qstyle.h:75
@ State_Mini
Definition qstyle.h:96
@ State_Small
Definition qstyle.h:95
@ State_Enabled
Definition qstyle.h:67
@ SC_DialTickmarks
Definition qstyle.h:388
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QPalette palette
the widget's palette
Definition qwidget.h:132
QWidget * parentWidget() const
Returns the parent of this widget, or \nullptr if it does not have any parent widget.
Definition qwidget.h:904
bool testAttribute(Qt::WidgetAttribute) const
Returns true if attribute attribute is set on this widget; otherwise returns false.
Definition qwidget.h:910
QOpenGLWidget * widget
[1]
QPixmap p2
QPixmap p1
[0]
rect
[4]
QStyleOptionButton opt
int calcBigLineSize(int radius)
QPolygonF calcLines(const QStyleOptionSlider *dial)
void drawDial(const QStyleOptionSlider *option, QPainter *painter)
QVector3D maximum(const QVector3D &v1, const QVector3D &v2) Q_DECL_NOTHROW
Definition qssgutils_p.h:55
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left, int top, int right, int bottom)
static bool usePixmapCache(const QStyleOption *opt)
Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, qreal dpi)
Q_WIDGETS_EXPORT qreal dpi(const QStyleOption *option)
QString uniqueName(const QString &key, const QStyleOption *option, const QSize &size, qreal dpr)
WidgetSizePolicy widgetSizePolicy(const QWidget *widget, const QStyleOption *opt)
QColor backgroundColor(const QPalette &pal, const QWidget *widget)
static const qreal qstyleBaseDpi
Combined button and popup list for selecting options.
@ WA_MacMiniSize
Definition qnamespace.h:363
@ WA_MacNormalSize
Definition qnamespace.h:361
@ WA_MacSmallSize
Definition qnamespace.h:362
@ WA_StyleSheetTarget
Definition qnamespace.h:417
@ transparent
Definition qnamespace.h:47
@ NoPen
@ AA_Use96Dpi
Definition qnamespace.h:433
@ NoBrush
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Q_GUI_EXPORT int qt_defaultDpiX()
Definition qfont.cpp:110
auto qCos(T v)
Definition qmath.h:60
auto qAtan(T v)
Definition qmath.h:84
auto qSin(T v)
Definition qmath.h:54
static QT_BEGIN_NAMESPACE const qreal Q_PI
Definition qmath_p.h:24
constexpr const T & qMin(const T &a, const T &b)
Definition qminmax.h:40
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
const GLfloat * m
GLuint64 key
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLboolean r
[2]
GLuint GLfloat GLfloat GLfloat x1
GLdouble GLdouble GLdouble GLdouble top
GLdouble GLdouble right
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLint GLsizei width
GLint left
GLint GLint bottom
GLfloat angle
GLenum GLuint GLintptr offset
GLhandleARB obj
[2]
GLdouble s
[6]
Definition qopenglext.h:235
const GLubyte * c
GLfixed GLfixed GLfixed y2
GLfixed GLfixed x2
GLfloat GLfloat p
[1]
GLuint GLenum option
GLenum GLsizei len
static QT_BEGIN_NAMESPACE qreal dpr(const QWindow *w)
#define BEGIN_STYLE_PIXMAPCACHE(a)
Definition qstyle_p.h:46
#define END_STYLE_PIXMAPCACHE
Definition qstyle_p.h:66
QT_BEGIN_NAMESPACE Q_GUI_EXPORT int qt_defaultDpiX()
Definition qfont.cpp:110
#define Q_UNUSED(x)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
unsigned int uint
Definition qtypes.h:34
double qreal
Definition qtypes.h:187
widget render & pixmap
QPainter painter(this)
[7]
QSpinBox * spinBox
[0]