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
HelloWorld.qml.cpp
Go to the documentation of this file.
1
// Copyright (C) 2022 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
/* Disclaimer: This file is an "as is" copy of the C++ header generated for the
5
accompanying HelloWorld.qml. Its pieces are used to:
6
7
* verify that the generated code is similar to what is contained in this file
8
* provide documentation snippets for the qmltc docs
9
10
Note: all the stuff below MAGIC_QMLTC_TEST_DELIMITER_LINE comment
11
participates in the aforementioned activities. Prefer to put arbitrary stuff
12
before that comment.
13
*/
14
15
// MAGIC_QMLTC_TEST_DELIMITER_LINE
16
17
//! [qmltc-hello-world-generated]
18
class
HelloWorld
:
public
QObject
19
{
20
Q_OBJECT
21
QML_ELEMENT
22
Q_PROPERTY
(
QString
hello
READ
hello
WRITE
setHello
BINDABLE
bindableHello
)
23
24
public
:
25
HelloWorld
(
QQmlEngine
*
engine
,
QObject
*
parent
=
nullptr
, [[
maybe_unused
]]
qxp
::
function_ref
<
void
(
PropertyInitializer
&)>
initializer
= [](
PropertyInitializer
&){});
26
27
Q_SIGNALS
:
28
void
created
();
29
30
public
:
31
QString
hello
();
32
void
setHello
(
const
QString& hello_);
33
QBindable
<
QString
>
bindableHello
();
34
Q_INVOKABLE
void
printHello
(passByConstRefOrValue<QString> prefix, passByConstRefOrValue<QString> suffix);
35
36
// ...
37
};
38
//! [qmltc-hello-world-generated]
HelloWorld
[qmltc-hello-world-generated]
Definition
HelloWorld.qml.cpp:19
HelloWorld::printHello
Q_INVOKABLE void printHello(passByConstRefOrValue< QString > prefix, passByConstRefOrValue< QString > suffix)
HelloWorld::hello
QString hello()
HelloWorld::setHello
void setHello(const QString &hello_)
HelloWorld::bindableHello
QBindable< QString > bindableHello()
HelloWorld::hello
QML_ELEMENTQString hello
Definition
HelloWorld.qml.cpp:22
qtdeclarative
src
qml
doc
snippets
qmltc
special
HelloWorld.qml.cpp
Generated on
for Qt by
1.14.0