aboutsummaryrefslogtreecommitdiffstats
path: root/doc/qtdesignstudio/src/views/qtquick-connection-view.qdoc
blob: 89c55b45716d2bf07ce02a6175858bde029dc00d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page qtquick-connection-view.html
    \previouspage qtquick-properties-view.html
    \nextpage qtquick-states-view.html

    \title Connection View

    \uicontrol {Connection View} is a collection of views that enable you
    to create connections between components and the application, to bind
    component properties together, and to add custom properties for components.

    \image qmldesigner-connections.png "Connection View"

    The \l{glossary-component}{components} of the application UI and the
    application logic need to communicate with each other. For example, a
    button needs to know that the user has clicked it. The button may then
    change color to indicate its state or perform an action. Further, the
    application needs to know whether the user clicked the button because
    it may need to relay this clicking event to other applications. For
    this purpose, a button typically contains a \l{Mouse Area} component,
    which can receive different pointer events and emit \e signals in
    response to them.

    Another way to connect components is to bind their \l{Properties}
    {properties} together. A component's property can be assigned a static
    value which stays constant until it is explicitly changed. To make the
    UI more dynamic, you can use \e {property bindings}. This means that
    you can specify relationships between component properties so that when
    the value of a property changes, the values of any properties that are
    bound to it are updated accordingly.

    Each preset component has a set of \l{Specifying Component Properties}
    {preset properties} that you can specify values for. You can add
    custom properties that would not otherwise exist for a particular
    \l{Component Types}{component type}.

    \if defined(qtcreator)
    In addition, application developers can use the \uicontrol Backends view
    to access QObject objects implemented in C++ from QML files.
    \endif

    \section1 Summary of Connection Views

    \table
    \header
        \li View
        \li Purpose
        \li Read More
    \row
        \li \uicontrol Connections
        \li Create connections between components and the application logic
            by accessing signals outside of the components that emit them.
        \li \l{Connecting Components to Signals}
    \row
        \li \uicontrol Bindings
        \li Dynamically change the behavior of a component by creating a
            binding between the properties of two components.
        \li \l{Adding Bindings Between Properties}
        \row
        \li \uicontrol Properties
        \li Add custom properties that would not otherwise exist for a
            particular preset component or your own custom component.
        \li \l{Specifying Dynamic Properties}
    \if defined(qtcreator)
    \row
        \li \uicontrol Backends
        \li Access QObject objects implemented in C++ from QML files.
        \li \l{Managing C++ Backend Objects}
    \endif
    \endtable
*/