summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/code/src_gui_image_qpixmap.cpp
blob: 2ef59d8f24a321b7ef0f3b4c9068df4209460389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QBitmap>
#include <QPixmap>

namespace src_gui_image_qpixmap {

void wrapper0() {

//! [1]
QPixmap myPixmap;
myPixmap.setMask(myPixmap.createHeuristicMask());
//! [1]

} // wrapper0


void wrapper1() {

//! [2]
QPixmap pixmap("background.png");
QRegion exposed;
pixmap.scroll(10, 10, pixmap.rect(), &exposed);
//! [2]

} // wrapper1
} // src_gui_image_qpixmap