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) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <qiconengineplugin.h>
5#include <qstringlist.h>
6
7#include "qsvgiconengine.h"
8
9#include <qiodevice.h>
10#include <qbytearray.h>
11#include <qdebug.h>
12
14
16{
18#ifndef QT_NO_COMPRESS
19 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "qsvgiconengine.json")
20#else
21 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QIconEngineFactoryInterface" FILE "qsvgiconengine-nocompress.json")
22#endif
23
24public:
25 QIconEngine *create(const QString &filename = QString()) override;
26};
27
29{
31 if (!file.isNull())
33 return engine;
34}
35
37
38#include "main.moc"
The QIconEnginePlugin class provides an abstract base for custom QIconEngine plugins.
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
@ Normal
Definition qicon.h:22
@ Off
Definition qicon.h:23
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QIconEngine * create(const QString &filename=QString()) override
Creates and returns a QIconEngine object for the icon with the given filename.
Definition main.cpp:28
Combined button and popup list for selecting options.
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
QFile file
[0]
view create()
QJSEngine engine
[0]