Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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() {
7QString imagePath(QStringLiteral("path/image.jpeg"));
9image.fill(Qt::red);
10{
11 QImageWriter writer(imagePath);
12 writer.write(image);
13}
14
15QFile::rename(imagePath,
16 QStringLiteral("path/other_image.jpeg"));
18
19} // wrapper
bool rename(const QString &newName)
Renames the file currently specified by fileName() to newName.
Definition qfile.cpp:554
The QImageWriter class provides a format independent interface for writing images to files or other d...
\inmodule QtGui
Definition qimage.h:37
@ Format_RGB32
Definition qimage.h:46
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
@ red
Definition qnamespace.h:35
Definition image.cpp:4
#define QStringLiteral(str)
void wrapper()
Definition main.cpp:5