Creating Projects

One of the major advantages of Qt Design Studio is that it allows a team of designers and developers to share a project across different development platforms with a common tool for design, development, profiling, and debugging.

Creating a project enables you to:

  • Group files together.
  • Include UI files (.ui.qml), component files (.qml), and assets files.
  • Specify settings for previewing UIs.

Setting up a new project in Qt Design Studio is aided by a wizard with a set of presets that you can choose from. You can adjust project settings and save custom presets. When you create a project, all necessary files are created.

The following presets are available:

CategoryPresetPurpose
RecentsLists your most recently used presets.
GeneralEmptyCreates a project that uses default components such as rectangles, images, and text. You can run the application on all target platforms.
3DCreates a project that uses default and 3D components such as cameras, lights, 3D models, and materials.
3D ExtendedCreates a project that uses default and 3D components, such as camera, light, model and materials. Extended scene environment is also included to enable various built-in effects.
Qt for MCUsMCUCreates an application that uses a subset of default components (as supported by Qt for MCUs) that you can deploy, run, and debug on MCU boards. For more information, see Creating Projects for MCUs.
MobileScrollCreates an application that uses Qt Quick controls to implement a scrollable list.
StackCreates an application that uses Qt Quick controls to implement a set of pages with a stack-based navigation model.
SwipeCreates an application that uses Qt Quick controls to implement a swipable screen.
DesktopLauncherCreates a project that uses default components such as rectangles, images, and text, and defines a launcher application.
CustomLists your saved custom presets.

Note: This tab is not visible if there are no saved custom presets.

"The Create Project wizard"

To test how well your designs work, you can preview the UIs on the desktop, embedded Linux devices, or Android devices. For more information, see Validating with Target Hardware.

You can export designs from other design tools and import them to projects. For more information, see Exporting from Design Tools and Importing Designs From Other Design Tools.

Creating a Project

To create a project:

  1. Select File > New Project.
  2. In the Presets tab, select a preset.
  3. In the Details tab:
    • Enter a name for the project. Keep in mind that projects cannot be easily renamed later.
    • Select the path for the project files. You can move project folders later.
    • Set the screen resolution for previewing the UI on the desktop or on a device. This determines the screen size. You can change the screen size later in Properties.
    • Select Use Qt Virtual Keyboard to enable users to enter text using a virtual keyboard.
    • In Target Qt Version, select the Qt version to use for developing the application. While you can change the Qt version later in the Run Settings of the project, as described in Overriding the Preview Tool, keep in mind that the two versions are not fully compatible.
  4. In the Style tab, select one of the predefined UI styles to use.
  5. Select Create to create the project.

Qt Design Studio creates the following files and folders:

"Qt Design Studio project files"

File/FolderDescription
ProjectName.qmlprojectThis file defines that all components, JavaScript, and image files in the project folder belong to the project. Therefore, you do not need to individually list all the files in the project. Since Qt Design Studio 4.5, the default QML import path defined within the .qmlproject file is ".". However, you can add more import paths by editing the .qmlproject file.
ProjectName (folder)This folder contains the essential QML files for the project.
Constants.qmlThis file defines a font loader for the Arial font and the screen resolution. The size of the default Screen.ui.qml Rectangle should be set as width: Constants.width & height: Constants.height so that it inherits the global resolution saved here. This is the default QML singleton created by the wizard. You can add more singletons here. Afterward, edit the qmldir file accordingly.
EventListModel.qmlThis file defines and triggers "Global Events" in a Qt Design Studio/QML application.
EventListSimulator.qmlThis file defines and triggers "Global Events" in a Qt Design Studio/QML application.
qmldirThis is a module definition file that declares the Constant component. For more information, see Module Definition qmldir Files.
ProjectNameContent (folder)This folder contains the default content, such as QML files, images, and other necessary files. It is not considered a module in Qt Design Studio context. Do not import it if you want to make singletons and objects. Use the ProjectName module instead.
App.qmlThis file defines the default dimension of the application window. This is the entry point to QML application.
Screen01.ui.qmlThis file defines a custom component that you can edit in the 2D view. For more information, see UI Files. The project wizard generates this as the first scene.
qtquickcontrols2.confThis file specifies the preferred style and style-specific arguments.

Depending on the assets, components, effects, and animations you use, the project might include additional files and folders.

"Qt Design Studio project files"

File/FolderDescription
Generated (folder)This folder contains all the files related to QtQuick3D and the modules for imported 3D components and elements from the content library, such as Materials and Effects.
Bundles (folder)This folder contains imported 3D components and elements from the content library, such as Materials.
QtQuick3D (folder)This folder contains all the files from an imported Qt Quick 3D object, such as meshes, images, animations, and QML files.
Effects (folder)This folder contains all the files related to the effects created with Effect Composer.
Materials (folder)This folder contains the files related to the materials, such as images, shaders, and QML files.

To use JavaScript and image files in the UI, select Assets > .

Using Custom Presets

You can save project settings as custom presets. All saved custom presets are available on the Custom tab in the Create Project wizard. You cannot modify custom presets once you have created them.

To create a custom preset:

  1. In the Create Project wizard, set the details and style that you want to use.
  2. Select Save Custom Preset and give a name for the custom preset.

Adding Files to Projects

You can use wizard templates to add individual files to projects.

The wizard templates in the Qt Quick Controls category create stylable versions of the components in the Qt Quick Controls module. For more information, see Creating Custom Controls.

You can create the following types of files:

CategoryWizard TemplatePurpose
Qt Quick FilesQt Quick FileGenerates a component with one of the following default components or positioners as the root component: Item, Rectangle, Image, Border Image, Flickable, Row, Column, Flow, or Grid.
Qt Quick UI FileGenerates a UI file with one of the above components as the root component.
Qt Quick ViewsGenerates a Grid View or a List View. For more information, see List and Grid Views.
Qt Quick UI FormCreates a UI file along with a matching QML file for implementation purposes.
Qt Quick ControlsCustom ButtonCreates a push button with a text label.
Custom CheckBoxCreates a check box.
Custom DialCreates a dial.
Custom SliderCreates a slider.
Custom SpinBoxCreates a spin box.
Custom SwitchCreates a switch with on and off states.
PaneProvides a background that matches the UI style and theme.
Stacked LayoutProvides a stack-based navigation model.
SwipeViewEnables users to navigate pages by swiping sideways.
QML FilesListModelAdds a list model to the project.
JavaScriptJavaScript FileGenerates files that you can use to write the application logic. This is useful for testing the application before the developers implement the application logic in C++, for example. For more information, see Simulating Application Logic.

Available under certain Qt licenses.
Find out more.