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
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 Samuel Gaist <samuel.gaist@idiap.ch>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3#include <QtGui>
4
5void wrapper() {
6//! [0]
7QString imagePath(QStringLiteral("path/image.jpeg"));
8QImage image(64, 64, QImage::Format_RGB32);
9image.fill(Qt::red);
10{
11 QImageWriter writer(imagePath);
12 writer.write(image);
13}
14
15QFile::rename(imagePath,
16 QStringLiteral("path/other_image.jpeg"));
17//! [0]
18
19} // wrapper
void wrapper()