forked from qt-creator/qt-creator
Doc: Document context menu commands for components
- Add a table that lists commands available for components in Navigator and Form Editor - Include the table in Navigator and Form Editor topics using an include file - Add documentation for new commands (and those that were not documented for some reason) Task-number: QDS-2744 Change-Id: I6d2d886aaeb9d7f5e21ca5e8007e3b036c61f1d0 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
BIN
doc/qtcreator/images/qmldesigner-implement-signal-handler.png
Normal file
BIN
doc/qtcreator/images/qmldesigner-implement-signal-handler.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
BIN
doc/qtcreator/images/qmldesigner-merge-with-template.png
Normal file
BIN
doc/qtcreator/images/qmldesigner-merge-with-template.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@@ -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]
|
||||||
|
*/
|
@@ -246,6 +246,25 @@
|
|||||||
\include qtdesignstudio-components.qdocinc creating studio components
|
\include qtdesignstudio-components.qdocinc creating studio components
|
||||||
\endif
|
\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
|
\section1 Moving Within Components
|
||||||
|
|
||||||
Components can consist of several other components. To view the component
|
Components can consist of several other components. To view the component
|
||||||
@@ -256,4 +275,17 @@
|
|||||||
component.
|
component.
|
||||||
|
|
||||||
\image qmldesigner-breadcrumbs.png "Go into Component command"
|
\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.
|
||||||
*/
|
*/
|
||||||
|
@@ -84,6 +84,25 @@
|
|||||||
in the context menu to specify the connection in
|
in the context menu to specify the connection in
|
||||||
\uicontrol {Connection Editor}.
|
\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)
|
\if defined(qtdesignstudio)
|
||||||
\section1 Adding Actions and Assignments
|
\section1 Adding Actions and Assignments
|
||||||
|
|
||||||
|
@@ -148,4 +148,5 @@
|
|||||||
select the \inlineimage reset.png
|
select the \inlineimage reset.png
|
||||||
(\uicontrol {Reset View}) button.
|
(\uicontrol {Reset View}) button.
|
||||||
|
|
||||||
|
\include qtquick-component-context-menu.qdocinc context-menu
|
||||||
*/
|
*/
|
||||||
|
@@ -142,4 +142,5 @@
|
|||||||
the item into a new position. The topmost item under the cursor becomes the
|
the item into a new position. The topmost item under the cursor becomes the
|
||||||
new parent of the item.
|
new parent of the item.
|
||||||
|
|
||||||
|
\include qtquick-component-context-menu.qdocinc context-menu
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user