Files
qt-creator/doc/qtcreator/src/qtquick/qtquick-library.qdoc

113 lines
4.2 KiB
Plaintext
Raw Normal View History

/****************************************************************************
**
** Copyright (C) 2021 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.
**
****************************************************************************/
/*!
\page quick-library.html
\if defined(qtdesignstudio)
\previouspage qtquick-form-editor.html
\else
\previouspage creator-using-qt-quick-designer.html
\endif
\nextpage qtquick-navigator.html
\title Library
The \uicontrol Library view lists the available components and assets.
\section1 Components
\image qtquick-components-tab.png "Library view Components tab"
\uicontrol Components displays modules that have been added to your project.
The modules contain visual components, such as basic shapes, UI controls,
and 3D components, and add functionality to the project. All components have
a type.
The UI controls can be styled to have the look and feel of a particular
operating system, such as \macOS, Windows, Android, or iOS.
Some modules have no visible components. For example, the
\uicontrol {Qt.Multimedia} module adds support for audio and video
files to your UI.
\section2 Component Types
You can add the following types of components to your project:
\list
\li \l Shapes
\li \l Text
\li \l Images
\li \l {User Interaction Methods}
\li \l {Lists and Other Data Models}
\if defined(qtdesignstudio)
\li \l {2D Effects}
\li \l {Logic Helpers}
\endif
\li \l Animations
\endlist
For more information about creating your own components, see
\l{Creating Components}.
\section2 Adding and Removing Modules
When you create projects, modules typically needed in them are added by
default. For example, an empty application project contains only basic
components, while a 3D application project contains additional 3D
components.
To add modules to the project, select \inlineimage plus.png
, and then select the module to add from the list of available
modules.
\image qtquick-components-tab-add.png "Select Modules to Add"
This adds an \e {import statement} to the component code that you
can see in \uicontrol {Text Editor}. For example, if you add the
\uicontrol QtQuick.Controls module, the following import statement
is added to the code: \c {import QtQuick.Controls}.
You can search for components and modules by entering search criteria
in the \uicontrol Search field.
The added components and modules are packaged with your UI into the final
application package, so it is recommended that you select
\uicontrol {Remove Module} to remove the ones you don't use in the project.
\section1 Assets
\uicontrol {Assets} displays the images and other files that you add to
the project folder by selecting \inlineimage plus.png
.
\image qtquick-assets-tab.png "Library view Assets tab"
When you drag and drop assets from the tab to \uicontrol Navigator
or \uicontrol {Form Editor}, components with a suitable type are
automatically created for you. For example, components of the
\l{Images}{Image} type will be created for graphics files.
*/