2011-09-27 11:56:42 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2021-10-05 15:50:41 +02:00
|
|
|
** Copyright (C) 2021 The Qt Company Ltd.
|
2016-01-15 14:51:16 +01:00
|
|
|
** Contact: https://www.qt.io/licensing/
|
2011-09-27 11:56:42 +02:00
|
|
|
**
|
2016-01-15 14:51:16 +01:00
|
|
|
** This file is part of the Qt Creator documentation.
|
2011-09-27 11:56:42 +02:00
|
|
|
**
|
2016-01-15 14:51:16 +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
|
|
|
|
|
** 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.
|
2011-09-27 11:56:42 +02:00
|
|
|
**
|
2016-01-15 14:51:16 +01:00
|
|
|
** GNU Free Documentation License Usage
|
2011-09-27 11:56:42 +02:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Free
|
|
|
|
|
** Documentation License version 1.3 as published by the Free Software
|
2016-01-15 14:51:16 +01:00
|
|
|
** 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.
|
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
|
|
|
|
|
|
|
|
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
|
2017-08-04 15:39:08 +02:00
|
|
|
by default, select \uicontrol {Pin 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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
*/
|