The Library view lists the available components and assets.
Components displays modules that have been added to your project. In many modules the components have been further organized into different categories. 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 Qt.Multimedia module adds support for audio and video files to your UI.
You can add the following types of components to your project:
- User Interaction Methods
- Lists and Other Data Models
- 2D Effects
- Logic Helpers
- 3D Components
For more information about creating your own components, see Creating Components.
When you create projects, modules typically needed in them are added by default. For example, an empty application project contains basic components and UI controls, while a 3D application project contains additional 3D components.
To view the list of available modules, select . Most commonly used modules are placed at the top of the list in alphabetical order. You can search for components and modules by entering search criteria in the Search field.
Select the module to add it to Library > Components.
This adds an import statement to the component code that you can see in Text Editor. For example, if you add the QtQuick.Controls module, the following import statement is added to the code:
Since the added components and modules are packaged with your UI into the final application package, it is recommended that you select Remove Module to remove the ones you don't use in the project.
Library > Assets displays the images and other files that you add to the project folder by selecting .
When you drag-and-drop assets from Assets to Navigator or Form Editor, component instances with a suitable type are automatically created for you. For example, instances of the Image component will be created for graphics files.
To use the context menu commands in Library, right-click on the name of a module or category and select one of the following commands:
- Remove Module: removes the component module added to Library.
- Expand All: expands all the modules.
- Collapse All: collapses all the modules.
- Hide Category: hides the category from the module.
- Show Module Hidden Categories: shows the hidden categories of the module.
- Show All Hidden Categories: shows the hidden categories in all of the modules.
Available under certain Qt licenses.
Find out more.