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
qquickview-ex.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4//![0]
5int main(int argc, char *argv[])
6{
7 QGuiApplication app(argc, argv);
8
9 QQuickView *view = new QQuickView;
10 view->setSource(QUrl::fromLocalFile("myqmlfile.qml"));
11 view->show();
12 return app.exec();
13}
14//![0]
15
17//![1]
18 QScopedPointer<QQuickView> view { new QQuickView };
19 view->setInitialProperties({"x, 100"}, {"width", 50});
20 view->setSource(QUrl::fromLocalFile("myqmlfile.qml"));
21 view->show();
22//![1]
23}
void makeDocTeamHappyByKeepingExampleCompilable()
[0]
int main(int argc, char *argv[])
[ctor_close]