Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
4
#include <QGuiApplication>
5
#include <QQmlApplicationEngine>
6
7
int
main
(
int
argc,
char
*argv[])
8
{
9
QGuiApplication
app
(argc, argv);
10
11
QQmlApplicationEngine
engine
;
12
engine
.load(
QUrl
(
QStringLiteral
(
"qrc:/main.qml"
)));
13
14
return
app
.
exec
();
15
}
QApplication::exec
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
Definition
qapplication.cpp:2564
QGuiApplication
\macro qGuiApp
Definition
qguiapplication.h:37
QQmlApplicationEngine
QQmlApplicationEngine provides a convenient way to load an application from a single QML file.
Definition
qqmlapplicationengine.h:17
QUrl
\inmodule QtCore
Definition
qurl.h:94
main
int main()
[0]
Definition
doc_src_objecttrees.cpp:5
QStringLiteral
#define QStringLiteral(str)
Definition
qstringliteral.h:36
app
QApplication app(argc, argv)
[0]
engine
QJSEngine engine
[0]
Definition
src_script_qjsvalue.cpp:14
qtdeclarative
src
qml
doc
snippets
code
backend
main.cpp
Generated by
1.9.7