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_image_qpixmapcache.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#include <QPixmap>
5#include <QPixmapCache>
6
8
9void wrapper0(QPainter *painter) {
10//! [1]
11QPixmap pm;
12if (!QPixmapCache::find("my_big_image", &pm)) {
13 pm.load("bigimage.png");
14 QPixmapCache::insert("my_big_image", pm);
15}
16painter->drawPixmap(0, 0, pm);
17//! [1]
18
19} // wrapper0
20} // src_gui_image_qpixmapcache