Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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
13//! [0]
14QPainter painter(this);
15
16painter.setBrush(Qt::cyan);
17painter.setPen(Qt::darkCyan);
18painter.drawRect(0, 0, 100,100);
19
20painter.setBrush(Qt::NoBrush);
21painter.setPen(Qt::darkGreen);
22painter.drawRect(40, 40, 100, 100);
23//! [0]
24
25
26} // Wrapper::wrapper
27} // src_gui_painting_qbrush