26 int w =
option->rect.width() / 2;
27 int h =
option->rect.height() / 2;
29 y += (
option->rect.height() -
h) / 2;
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
[2]
CustomStyle(const QWidget *widget)
The QPainter class performs low-level painting on widgets and other paint devices.
void setPen(const QColor &color)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
\inmodule QtCore\reentrant
The QPolygon class provides a list of points using integer precision.
void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget=nullptr) const override
\reimp
The QSpinBox class provides a spin box widget.
The QStyleOption class stores the parameters used by QStyle functions.
PrimitiveElement
This enum describes the various primitive elements.
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLfloat GLfloat GLfloat GLfloat h
GLfixed GLfixed GLint GLint GLfixed points