2014-12-02 16:21:54 +01:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2021-03-04 13:16:36 +01:00
|
|
|
** Copyright (C) 2021 The Qt Company Ltd.
|
2016-01-15 14:51:16 +01:00
|
|
|
** Contact: https://www.qt.io/licensing/
|
2014-12-02 16:21:54 +01:00
|
|
|
**
|
2016-01-15 14:51:16 +01:00
|
|
|
** This file is part of the Qt Creator documentation.
|
2014-12-02 16:21:54 +01:00
|
|
|
**
|
|
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:51:16 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2014-12-02 16:21:54 +01:00
|
|
|
**
|
2016-01-15 14:51:16 +01:00
|
|
|
** GNU Free Documentation License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Free
|
|
|
|
|
** Documentation License version 1.3 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file included in the packaging of
|
|
|
|
|
** this file. Please review the following information to ensure
|
|
|
|
|
** the GNU Free Documentation License version 1.3 requirements
|
|
|
|
|
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
2014-12-02 16:21:54 +01:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
\page qmldesigner-connections.html
|
2021-06-10 17:10:47 +02:00
|
|
|
\previouspage qtquick-adding-dynamics.html
|
2018-07-03 11:39:35 +02:00
|
|
|
\nextpage quick-signals.html
|
2014-12-02 16:21:54 +01:00
|
|
|
|
|
|
|
|
\title Adding Connections
|
|
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
\list
|
|
|
|
|
\li \l{Connecting Components to Signals}
|
2018-07-03 11:39:35 +02:00
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
A signal and handler mechanism enables components to respond to
|
|
|
|
|
application events, which are represented by \e signals. When a
|
|
|
|
|
signal is emitted, the corresponding \e {signal handler} is
|
|
|
|
|
invoked to respond to the event by applying an action, for
|
|
|
|
|
example.
|
2018-07-03 11:39:35 +02:00
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
\li \l{Adding Bindings Between Properties}
|
2018-07-03 11:39:35 +02:00
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
A component's property can be assigned a static value that 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 automatically updated accordingly.
|
2018-07-03 11:39:35 +02:00
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
\li \l{Specifying Dynamic Properties}
|
2018-07-03 11:39:35 +02:00
|
|
|
|
2021-03-04 13:16:36 +01:00
|
|
|
Each preset component has a set of 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} or your custom components.
|
2014-12-02 16:21:54 +01:00
|
|
|
|
2018-08-24 13:46:38 +02:00
|
|
|
\if defined(qtcreator)
|
2018-07-03 11:39:35 +02:00
|
|
|
\li \l{Managing C++ Backend Objects}
|
2021-03-04 13:16:36 +01:00
|
|
|
|
|
|
|
|
Application developers can access QObject objects implemented in C++
|
|
|
|
|
from QML files.
|
2018-08-24 13:46:38 +02:00
|
|
|
\endif
|
2014-12-02 16:21:54 +01:00
|
|
|
\endlist
|
2019-05-15 15:23:04 +02:00
|
|
|
|
|
|
|
|
For an example of using properties, bindings, and connections to create a
|
|
|
|
|
scalable push button, see \l{Creating Scalable Buttons and Borders}.
|
2014-12-02 16:21:54 +01:00
|
|
|
*/
|