blob: 58450de37189d2ca63fbea678fb262fae271dd8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include <QtQml>
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
//! [0]
QJSEngine engine;
qDebug() << "the magic number is:" << engine.evaluate("1 + 2").toNumber();
//! [0]
return 0;
}
|