aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/RunCMake/generate_context_property_dump/main.cpp
blob: 30367957292722362f4a8dd042f5e766971272a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <QGuiApplication>
#include <QQmlContext>
#include <QQuickView>
#include <QDateTime>

int main(int argc, char *argv[])
{
    QGuiApplication app(argc, argv);

    QQuickView view;
    view.rootContext()->setContextProperty("myContextProperty", QDateTime::currentDateTime());
    view.loadFromModule("GenerateContextProperty", "Main");
    view.show();

    return app.exec();
}