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
doc_src_groups.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
4#include <QPixmap>
5#include <QPainter>
6
7void example()
8{
9 //! [1]
10 QPixmap p1, p2;
11 p1.load("image.bmp");
12 p2 = p1; // p1 and p2 share data
13
14 QPainter paint;
15 paint.begin(&p2); // cuts p2 loose from p1
16 paint.drawText(0,50, "Hi");
17 paint.end();
18 //! [1]
19}
void example()
[5]