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
7
namespace
src_gui_image_qpixmapcache
{
8
9
void
wrapper0
(QPainter *painter) {
10
//! [1]
11
QPixmap pm;
12
if
(!QPixmapCache::find(
"my_big_image"
, &pm)) {
13
pm.load(
"bigimage.png"
);
14
QPixmapCache::insert(
"my_big_image"
, pm);
15
}
16
painter->drawPixmap(0, 0, pm);
17
//! [1]
18
19
}
// wrapper0
20
}
// src_gui_image_qpixmapcache
src_gui_image_qpixmapcache
Definition
src_gui_image_qpixmapcache.cpp:7
src_gui_image_qpixmapcache::wrapper0
void wrapper0(QPainter *painter)
Definition
src_gui_image_qpixmapcache.cpp:9
qtbase
src
gui
doc
snippets
code
src_gui_image_qpixmapcache.cpp
Generated on
for Qt by
1.14.0