Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
doc_src_resources.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
5
QResource::registerResource
(
"/path/to/myresource.rcc"
);
7
8
10
MyClass::MyClass
() : BaseClass()
11
{
12
Q_INIT_RESOURCE
(resources);
13
14
QFile
file
(
":/myfile.dat"
);
15
...
16
}
MyClass::MyClass
MyClass(QObject *parent=nullptr)
QFile
\inmodule QtCore
Definition
qfile.h:93
QResource::registerResource
static bool registerResource(const QString &rccFilename, const QString &resourceRoot=QString())
Registers the resource with the given rccFileName at the location in the resource tree specified by m...
Definition
qresource.cpp:1205
Q_INIT_RESOURCE
#define Q_INIT_RESOURCE(name)
Definition
qtresource.h:14
file
QFile file
[0]
Definition
src_corelib_io_qfile.cpp:5
qtbase
src
corelib
doc
snippets
code
doc_src_resources.cpp
Generated by
1.9.7