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
qqmlapplicationengine_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 Research In Motion.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant
4
5#ifndef QQMLAPPLICATIONENGINE_P_H
6#define QQMLAPPLICATIONENGINE_P_H
7
9#include "qqmlengine_p.h"
10#include <QCoreApplication>
11#include <QFileInfo>
12#include <QLibraryInfo>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
26
27class QFileSelector;
28class Q_QML_EXPORT QQmlApplicationEnginePrivate : public QQmlEnginePrivate
29{
30 Q_DECLARE_PUBLIC(QQmlApplicationEngine)
31public:
32 QQmlApplicationEnginePrivate();
33 ~QQmlApplicationEnginePrivate();
34 void ensureInitialized();
35 void init();
36 void cleanUp();
37
38 void startLoad(const QUrl &url, const QByteArray &data = QByteArray(), bool dataFlag = false);
39 void startLoad(QAnyStringView uri, QAnyStringView type);
40 void _q_loadTranslations();
41 void finishLoad(QQmlComponent *component);
42 void ensureLoadingFinishes(QQmlComponent *component);
43 void updateTranslationDirectory(const QUrl &url);
44
45 QList<QObject *> objects;
46 QVariantMap initialProperties;
47 QStringList extraFileSelectors;
48 QString translationsDirectory;
49#if QT_CONFIG(translation)
50 std::unique_ptr<QTranslator> activeTranslator;
51#endif
52 bool isInitialized = false;
53};
54
55QT_END_NAMESPACE
56
57#endif
QQmlApplicationEngine provides a convenient way to load an application from a single QML file.
Combined button and popup list for selecting options.
static QUrl urlFromFilePath(const QString &filePath)
static QString translationsDirectoryFromLocalUrl(const QUrl &url)