2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
2011-09-27 11:56:42 +02:00
|
|
|
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
// NOTE: the sections are not ordered by their logical order to avoid
|
|
|
|
|
// reshuffling the file each time the index order changes (i.e., often).
|
|
|
|
|
// Run the fixnavi.pl script to adjust the links to the index order.
|
|
|
|
|
// **********************************************************************
|
|
|
|
|
|
|
|
|
|
/*!
|
2011-12-13 11:52:47 +01:00
|
|
|
\previouspage creator-indenting-code.html
|
2011-09-27 11:56:42 +02:00
|
|
|
\page qt-quick-toolbars.html
|
2018-08-24 13:46:38 +02:00
|
|
|
\if defined(qtdesignstudio)
|
|
|
|
|
\nextpage creator-diff-editor.html
|
|
|
|
|
\else
|
2011-12-13 11:52:47 +01:00
|
|
|
\nextpage creator-editor-codepasting.html
|
2018-08-24 13:46:38 +02:00
|
|
|
\endif
|
2011-09-27 11:56:42 +02:00
|
|
|
|
|
|
|
|
\title Using Qt Quick Toolbars
|
|
|
|
|
|
2013-03-13 11:39:36 +01:00
|
|
|
When you select a QML type in the code and a toolbar is available,
|
2021-12-08 19:01:53 +01:00
|
|
|
a light bulb icon appears: \inlineimage icons/refactormarker.png
|
2011-09-27 11:56:42 +02:00
|
|
|
. Select the icon to open the toolbar.
|
|
|
|
|
|
2013-03-13 11:39:36 +01:00
|
|
|
To open toolbars immediately when you select a QML type, select
|
2022-06-27 12:12:54 +02:00
|
|
|
\uicontrol Edit > \uicontrol Preferences > \uicontrol {Qt Quick} >
|
2017-08-04 15:39:08 +02:00
|
|
|
\uicontrol {QML/JS Editing} > \uicontrol {Always show Qt Quick Toolbar}.
|
2011-09-27 11:56:42 +02:00
|
|
|
|
2022-07-08 16:06:11 +02:00
|
|
|
\image qtcreator-qml-js-editing.png "QML/JS Editing preferences"
|
|
|
|
|
|
2011-09-27 11:56:42 +02:00
|
|
|
Drag the toolbar to pin it to another location. Select
|
2021-12-08 19:01:53 +01:00
|
|
|
\inlineimage icons/pin.png
|
2011-09-27 11:56:42 +02:00
|
|
|
to unpin the toolbar and move it to its default location. To pin toolbars
|
2022-07-08 16:06:11 +02:00
|
|
|
by default, select \uicontrol {Pin Qt Quick Toolbar}.
|
2011-09-27 11:56:42 +02:00
|
|
|
|
|
|
|
|
\section1 Previewing Images
|
|
|
|
|
|
|
|
|
|
The Qt Quick Toolbar for images allows you to edit the properties of
|
2021-10-05 15:50:41 +02:00
|
|
|
\l {Border Image} and
|
|
|
|
|
\if defined(qtdesignstudio)
|
|
|
|
|
\l {Images}{Image} items.
|
|
|
|
|
\else
|
|
|
|
|
\l Image items.
|
|
|
|
|
\endif
|
|
|
|
|
|
2011-09-27 11:56:42 +02:00
|
|
|
You can scale and tile the images, replace them with other images,
|
|
|
|
|
preview them, and change the image margins.
|
|
|
|
|
|
|
|
|
|
\image qml-toolbar-image.png "Qt Quick Toolbar for images"
|
|
|
|
|
|
|
|
|
|
To preview an image, double-click it on the toolbar. In the preview
|
|
|
|
|
dialog, you can zoom the image. Drag the image margins to change them.
|
|
|
|
|
|
|
|
|
|
\image qml-toolbar-image-preview.png "Image preview dialog"
|
|
|
|
|
|
|
|
|
|
\section1 Formatting Text
|
|
|
|
|
|
|
|
|
|
The Qt Quick Toolbar for text allows you to edit the properties of
|
2013-11-25 17:37:19 +01:00
|
|
|
\l{Text} items.
|
2011-09-27 11:56:42 +02:00
|
|
|
You can change the font family and size as well as text formatting, style,
|
|
|
|
|
alignment, and color.
|
|
|
|
|
|
2023-02-21 18:21:48 +01:00
|
|
|
\note Move the mouse pointer over a color hex value in the code editor to
|
|
|
|
|
see the color as a tooltip.
|
|
|
|
|
|
2011-09-27 11:56:42 +02:00
|
|
|
If a property is assigned an expression instead of a value, you
|
|
|
|
|
cannot use the toolbar to edit it. The button for editing the property
|
|
|
|
|
is disabled.
|
|
|
|
|
|
|
|
|
|
\image qml-toolbar-text.png "Qt Quick Toolbar for text"
|
|
|
|
|
|
|
|
|
|
By default, font size is specified as pixels. To use points, instead,
|
2014-12-11 15:43:19 +01:00
|
|
|
change \uicontrol px to \uicontrol pt in the size field.
|
2011-09-27 11:56:42 +02:00
|
|
|
|
|
|
|
|
\section1 Previewing Animation
|
|
|
|
|
|
|
|
|
|
The Qt Quick Toolbar for animation allows you to edit the properties of
|
2013-11-25 17:37:19 +01:00
|
|
|
PropertyAnimation items and the items that inherit it. You can
|
2011-09-27 11:56:42 +02:00
|
|
|
change the easing curve type and duration. For some curves, you can also
|
|
|
|
|
specify amplitude, period, and overshoot values.
|
|
|
|
|
|
|
|
|
|
\image qml-toolbar-animation.png "Qt Quick Toolbar for animation"
|
|
|
|
|
|
|
|
|
|
Select the play button to preview your changes.
|
|
|
|
|
|
|
|
|
|
\section1 Editing Rectangles
|
|
|
|
|
|
|
|
|
|
The Qt Quick Toolbar for rectangles allows you to edit the properties of
|
2021-10-05 15:50:41 +02:00
|
|
|
\if defined(qtdesignstudio)
|
|
|
|
|
\l {basic-rectangle}{Rectangle}
|
|
|
|
|
\else
|
|
|
|
|
Rectangle
|
|
|
|
|
\endif
|
|
|
|
|
items. You can change the fill and border colors and add gradients.
|
2011-09-27 11:56:42 +02:00
|
|
|
|
|
|
|
|
\image qml-toolbar-rectangle.png "Qt Quick Toolbar for rectangles"
|
|
|
|
|
|
|
|
|
|
To add gradient stop points, click above the gradient bar. To remove
|
|
|
|
|
stop points, drag them upwards.
|
|
|
|
|
|
|
|
|
|
*/
|