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
src_gui_painting_qbrush.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 <QPainter>
4
6
7struct Wrapper : public QPaintDevice {
8 void wrapper();
9};
11
12
14QPainter painter(this);
15
18painter.drawRect(0, 0, 100,100);
19
22painter.drawRect(40, 40, 100, 100);
24
25
26} // Wrapper::wrapper
27} // src_gui_painting_qbrush
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
void drawRect(const QRectF &rect)
Draws the current rectangle with the current pen and brush.
Definition qpainter.h:519
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.
@ darkCyan
Definition qnamespace.h:44
@ cyan
Definition qnamespace.h:38
@ darkGreen
Definition qnamespace.h:42
@ NoBrush
QPainter painter(this)
[7]