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
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
5QResource::registerResource("/path/to/myresource.rcc");
7
8
10MyClass::MyClass() : BaseClass()
11{
12 Q_INIT_RESOURCE(resources);
13
14 QFile file(":/myfile.dat");
15 ...
16}
MyClass(QObject *parent=nullptr)
\inmodule QtCore
Definition qfile.h:93
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...
#define Q_INIT_RESOURCE(name)
Definition qtresource.h:14
QFile file
[0]