Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
brush.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
#include <QLinearGradient>
4
5
namespace
brush
{
6
void
wrapper
() {
7
8
10
QLinearGradient
linearGrad(
QPointF
(100, 100),
QPointF
(200, 200));
11
linearGrad.
setColorAt
(0,
Qt::black
);
12
linearGrad.
setColorAt
(1,
Qt::white
);
14
15
17
QRadialGradient
radialGrad(
QPointF
(100, 100), 100);
18
radialGrad.
setColorAt
(0,
Qt::red
);
19
radialGrad.
setColorAt
(0.5,
Qt::blue
);
20
radialGrad.
setColorAt
(1,
Qt::green
);
22
23
}
// wrapper
24
}
// brush
QGradient::setColorAt
void setColorAt(qreal pos, const QColor &color)
Creates a stop point at the given position with the given color.
Definition
qbrush.cpp:1563
QLinearGradient
\inmodule QtGui
Definition
qbrush.h:394
QPointF
\inmodule QtCore\reentrant
Definition
qpoint.h:214
QRadialGradient
\inmodule QtGui
Definition
qbrush.h:412
Qt::white
@ white
Definition
qnamespace.h:30
Qt::blue
@ blue
Definition
qnamespace.h:36
Qt::black
@ black
Definition
qnamespace.h:29
Qt::green
@ green
Definition
qnamespace.h:35
Qt::red
@ red
Definition
qnamespace.h:34
brush
Definition
brush.cpp:5
brush::wrapper
void wrapper()
Definition
brush.cpp:6
qtbase
src
gui
doc
snippets
brush
brush.cpp
Generated by
1.9.7