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
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
3#include <QGuiApplication>
4#include <QtQuick>
5
6int main(int argc, char *argv[])
7{
8 QGuiApplication app(argc, argv);
9
10//![0]
11QQuickView view;
12view.rootContext()->setContextProperty("currentDateTime", QDateTime::currentDateTime());
13view.setSource(QUrl::fromLocalFile("MyItem.qml"));
14view.show();
15//![0]
16
17 return app.exec();
18}
int main(int argc, char *argv[])
[ctor_close]