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
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
4#include <QResource>
5#include <QFile>
6
7void wrap()
8{
9 //! [4]
10 QResource::registerResource("/path/to/myresource.rcc");
11 //! [4]
12}
13
14class BaseClass {
15 public:
17};
18
19class MyClass : BaseClass {
20 public:
22};
23
24//! [5]
26{
27 Q_INIT_RESOURCE(resources);
28
29 QFile file(":/myfile.dat");
30 //...
31}
32//! [5]
void wrap()
[23]