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
5
namespace
src_gui_painting_qbrush
{
6
7
struct
Wrapper
:
public
QPaintDevice
{
8
void
wrapper
();
9
};
10
void
Wrapper
::
wrapper
() {
11
12
13
//! [0]
14
QPainter painter(
this
);
15
16
painter.setBrush(Qt::cyan);
17
painter.setPen(Qt::darkCyan);
18
painter.drawRect(0, 0, 100,100);
19
20
painter.setBrush(Qt::NoBrush);
21
painter.setPen(Qt::darkGreen);
22
painter.drawRect(40, 40, 100, 100);
23
//! [0]
24
25
26
}
// Wrapper::wrapper
27
}
// src_gui_painting_qbrush
src_gui_painting_qbrush
Definition
src_gui_painting_qbrush.cpp:5
src_gui_painting_qbrush::Wrapper
Definition
src_gui_painting_qbrush.cpp:7
src_gui_painting_qbrush::Wrapper::wrapper
void wrapper()
Definition
src_gui_painting_qbrush.cpp:10
qtbase
src
gui
doc
snippets
code
src_gui_painting_qbrush.cpp
Generated on
for Qt by
1.14.0