Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
<
QtCore
>
4
#
include
<
QtQml
>
5
6
int
main
(
int
argc,
char
*argv[])
7
{
8
QCoreApplication app(argc, argv);
9
10
//![0]
11
QQmlEngine engine;
12
QQmlComponent component(&engine,
"MyItem.qml"
);
13
QObject *object = component.create();
14
15
qDebug() <<
"Property value:"
<< QQmlProperty::read(object,
"someNumber"
).toInt();
16
QQmlProperty::write(object,
"someNumber"
, 5000);
17
18
qDebug() <<
"Property value:"
<< object->property(
"someNumber"
).toInt();
19
object->setProperty(
"someNumber"
, 100);
20
//![0]
21
22
return
app.exec();
23
}
main
int main(int argc, char *argv[])
[ctor_close]
Definition
src_corelib_animation_qpropertyanimation.cpp:100
qtdeclarative
src
qml
doc
snippets
qml
qtbinding
properties-qml
main.cpp
Generated on
for Qt by
1.18.0