The Library view lists the available components and assets.
Library > 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:
- UI Controls
- User Interaction Methods
- Lists and Other Data Models
- 2D Effects
- Logic Helpers
- 3D Views
- Instanced Rendering
- Skeletal Animation
- 3D Models
- Materials and Shaders
- 3D Materials
- 3D Effects
- Custom Shaders
- Scene Environment
- Morph Target
For more information about creating your own components, see Creating Custom 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 dragging-and-dropping external asset files to Qt Design Studio or by selecting . For more information about importing assets to Qt Design Studio, see Importing 2D Assets and Importing 3D Assets.
To add multiple assets to your UI simultaneously, multiselect them first by holding Ctrl and clicking the asset files you wish to select.
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 the name of a module or category and select one of the following commands:
- Remove Module: removes the module and all of its components from Library > Components.
- 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.
Note: The context menu commands for the Library categories do not function if you have entered something into the Search field. Clear the Search field to resume using the context menu commands.
Available under certain Qt licenses.
Find out more.