diff --git a/doc/qtcreator/images/qmldesigner-implement-signal-handler.png b/doc/qtcreator/images/qmldesigner-implement-signal-handler.png new file mode 100644 index 00000000000..6098f89b9ac Binary files /dev/null and b/doc/qtcreator/images/qmldesigner-implement-signal-handler.png differ diff --git a/doc/qtcreator/images/qmldesigner-merge-with-template.png b/doc/qtcreator/images/qmldesigner-merge-with-template.png new file mode 100644 index 00000000000..ebde3829a05 Binary files /dev/null and b/doc/qtcreator/images/qmldesigner-merge-with-template.png differ diff --git a/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc b/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc new file mode 100644 index 00000000000..5c73bcf1562 --- /dev/null +++ b/doc/qtcreator/src/qtquick/qtquick-component-context-menu.qdocinc @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2020 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Qt Creator documentation. +** +** 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 +** 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. +** +** 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. +** +****************************************************************************/ + +/*! +//! [context-menu] + \section1 Context Menu + + The following table summarizes the \uicontrol Navigator and + \uicontrol {Form Editor} context menu items and provides links + to more information about them. + + \table + \header + \li To Learn About + \li Go To + \row + \li Arrange + \li \l{Arranging Items} + \row + \li Edit + \li \l{Showing and Hiding Items} + \row + \li Anchors + \li \l{Setting Anchors and Margins} + \row + \li Group + \li \l Group + \row + \li Position + \li \l{Using Positioners} + \row + \li Layout + \li \l{Using Layouts} + \row + \li Stacked Container + \li \l{Lists and Other Data Models} + \row + \li Timeline + \li \l{Creating Timelines} + \row + \li Event List + \li \l{Simulating Events} + \row + \li Edit Color + \li \l{Editing Properties Inline} + \row + \li Edit Annotation + \li \l{Annotating Designs} + \row + \li Merge File with Template + \li \l{Merging Files with Templates} + \row + \li Move Component into Separate File + \li \l{Moving Components into Separate Files} + \row + \li Add New Signal Handler + \li \l{Adding Signal Handlers} + \row + \li Go to Implementation + \li \l{Using Qt Quick UI Forms} + \row + \li Go into Component + \li \l{Moving Within Components} + \endtable +//! [context-menu] +*/ diff --git a/doc/qtcreator/src/qtquick/qtquick-components.qdoc b/doc/qtcreator/src/qtquick/qtquick-components.qdoc index a082e23f848..82a90f702e0 100644 --- a/doc/qtcreator/src/qtquick/qtquick-components.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-components.qdoc @@ -246,6 +246,25 @@ \include qtdesignstudio-components.qdocinc creating studio components \endif + \section1 Moving Components into Separate Files + + An alternative way of creating reusable components is to move them into + separate QML files. Right-click a component in the \uicontrol Navigator + or \uicontrol {Form Editor} view and select + \uicontrol {Move Component into Separate File} in the context menu. + + \image qtcreator-move-component-into-separate-file.png + + Give the new component a name and select whether properties are set for + the new component or for the original one. + + For an example of creating a reusable custom component, see + \if defined(qtcreator) + \l{Creating a Mobile Application}. + \else + \l{Progress Bar}. + \endif + \section1 Moving Within Components Components can consist of several other components. To view the component @@ -256,4 +275,17 @@ component. \image qmldesigner-breadcrumbs.png "Go into Component command" + + \section1 Merging Files with Templates + + You can merge the current QML file against an existing second QML file and + using the second QML file in a way similar to using a CSS stylesheet. + + To use this experimental feature, right-click a component in the + \uicontrol Navigator or \uicontrol {Form Editor} view and select + \uicontrol {Merge File with Template} in the context menu. + + \image qmldesigner-merge-with-template.png "Merge with Template dialog" + + In the \uicontrol Template field, select the file to use as a template. */ diff --git a/doc/qtcreator/src/qtquick/qtquick-connection-editor-signals.qdoc b/doc/qtcreator/src/qtquick/qtquick-connection-editor-signals.qdoc index a9b04c79373..43679007285 100644 --- a/doc/qtcreator/src/qtquick/qtquick-connection-editor-signals.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-connection-editor-signals.qdoc @@ -44,7 +44,7 @@ A signal is automatically emitted when the value of a QML property changes. This type of signal is a \e{property change signal} and signal handlers - for these signals are written in the form \c onChanged, where + for these signals are written in the form \c onChanged, where \e is the name of the property, with the first letter capitalized. @@ -84,6 +84,25 @@ in the context menu to specify the connection in \uicontrol {Connection Editor}. + \section1 Adding Signal Handlers + + If a signal handler that you need is not listed in the + \uicontrol {Signal Handler} column, you can add it: + + \list 1 + \li Right-click a component in the \uicontrol Navigator or + \uicontrol {Form Editor} view and select + \uicontrol {Add New Signal Handler} in the context menu. + \li In the \uicontrol Signal field, select the signal to handle. + \image qmldesigner-implement-signal-handler.png "Implement Signal Handler dialog" + \li Select the radio buttons to filter the list to only display + frequently used signals or property changes. + \li Select \uicontrol OK. + \endlist + + The added signal handler is automatically \l{Using Qt Quick UI Forms} + {exported as a property}. + \if defined(qtdesignstudio) \section1 Adding Actions and Assignments diff --git a/doc/qtcreator/src/qtquick/qtquick-form-editor.qdoc b/doc/qtcreator/src/qtquick/qtquick-form-editor.qdoc index ef4cb184372..c7efa1ef8ef 100644 --- a/doc/qtcreator/src/qtquick/qtquick-form-editor.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-form-editor.qdoc @@ -148,4 +148,5 @@ select the \inlineimage reset.png (\uicontrol {Reset View}) button. + \include qtquick-component-context-menu.qdocinc context-menu */ diff --git a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc index 3e14fd476cb..fc9e959d066 100644 --- a/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-navigator.qdoc @@ -142,4 +142,5 @@ the item into a new position. The topmost item under the cursor becomes the new parent of the item. + \include qtquick-component-context-menu.qdocinc context-menu */