Qt как добавить комплект
Перейти к содержимому

Qt как добавить комплект

  • автор:

Configuring Projects

When you install Qt for a target platform, such as Android or QNX, the Qt Online Installer creates kits for the development targets. Select the kits to use in the Configure Projects view when you open a project for the first time. At least one kit must be active. For more information about selecting the initial kit, see Opening Projects.

To maintain the list of active kits for a currently open project, switch to the Projects mode by pressing Ctrl+5.

Activating Kits for a Project

The Build & Run section of the sidebar lists the kits that are compatible with your project. To activate one or more kits, click them.

The list displays kits from Edit > Preferences > Kits. Warning and error icons indicate that the kit configuration is not suitable for the project type. To view the warning and error messages, move the mouse pointer over the kit name.

In the list of kits, you may see entries described as Replacement for <kit-name>. Qt Creator generates them to save your project-specific settings, such as custom build flags or run configuration arguments that would disappear if the corresponding kits were simply removed when you remove Qt versions while updating your Qt installation. You can modify the kit configuration to use a currently installed Qt version and save the kit under a new name.

To modify kit configuration or to add kits to the list or to remove them from it, select Manage Kits. For more information about managing kits, see Adding Kits.

Each kit consists of a set of values that define one environment, such as a device, compiler, and Qt version. For more information, see Adding Qt Versions, Adding Compilers, and Adding Debuggers.

To copy the build and run settings for a kit to another kit, select Copy Steps from Other Kit in the context menu.

To deactivate a kit, select Disable Kit for Project in the context menu.

Note: Deactivating a kit removes all custom build and run settings for the kit.

To import an existing build for the project, select Import Existing Build.

Specifying Settings

To specify build or run settings for a kit, select Build or Run below the kit. For more information, see Specifying Build Settings and Specifying Run Settings.

In addition, you can modify the following global settings for each project:

If you have multiple projects open in Qt Creator, select the project to configure in the list of projects.

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Adding Kits

Qt Creator groups settings used for building and running projects as kits to make cross-platform and cross-configuration development easier. Each kit consists of a set of values that define one environment, such as a device, compiler, Qt version, and debugger command to use, and some metadata, such as an icon and a name for the kit. Once you have defined kits, you can select them to build and run projects.

Qt Creator supports development for the desktop and for the following types of devices:

Filtering Kit Settings

Typically, only a subset of the kit settings is relevant for a particular setup. Therefore, Qt Creator plugins register sets of relevant settings that you can view and modify in Edit > Preferences > Kits. For example, if you use CMake to build all your projects, you can hide Qbs and qmake settings by default.

To hide and show settings in the Kits tab for the current kit, select Settings Filter. To view and modify the settings displayed when you add a new kit, select Default Settings Filter.

Specifying Kit Settings

    Select Edit > Preferences > Kits > Add.

To clone the selected kit, select Clone.

Qt Creator uses the default kit if it does not have enough information to choose the kit to use. To set the selected kit as the default kit, select Make Default.

Kit Settings

The following table summarizes the available kit settings.

Setting Value
Name Name of the kit. You can use variables to generate the kit name based on the values you set in the other fields.
Image to use as an icon for the kit.
File system name Name for the kit to use as a part of directory names. This value is used for the CurrentKit:FileSystemName variable, which determines the name of the shadow build directory, for example.
Run device type Type of the run device.

Double-click the icon next to the field to select the image that is displayed in the kit selector for this kit. You can use any image in a supported file format (for example, PNG). The image is scaled to the size 64×64 pixels. For example, using the compiler logo as an icon allows you to easily see, which compiler is used to build the project for the selected kit.

This setting is used to tell the code model which compiler is used. If your project type and build tool support it, Qt Creator also tells the build tool to use this compiler for building the project.

For Android kits, the Android GDB server field will display the path to GDB server executable.

Qt Creator checks the directories listed in the PATH environment variable for the qmake executable. It refers to the qmake executable it finds as Qt in PATH and selects it as the Qt version to use for the Desktop kit that is created by default.

Editing Qbs Profiles

To view the Qbs profile associated with the kit, select Edit > Preferences > Qbs > Profiles.

You can add keys and values to the profile or remove them from it, as well as modify existing values. For a list of available keys and values, see List of Modules in the Qbs Manual.

To edit the Qbs profile associated with the kit:

    In Edit > Preferences > Kits, select the kit, and then select Change next to the Additional Qbs Profile Settings field to open the Custom Properties dialog.

To modify an existing value, double-click it in the Value field.

To remove the selected property, select Remove.

© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

Программа пишет, что отсутствуют подходящие комплекты

Добрый день. Хочу начать осваивать работу с Qt по книге Шлее М. — Профессиональное программирование на C++. Qt 4.8. но там, к сожалению, не описывается, что нужно установить.
Были скачаны и установлены Qt 4.8.5 (в папке C:\Qt\4.8.5)
Qt Creator (в папке C:\Qt\qtcreator-3.0.1)
а также компилятор MinGW (C:\MinGW)

Пытаюсь создать Qt Creator — Создать проект — Приложение Qt Quick — Выбираю набор компонентов Qt Quick 1.1
И далее программа пишет, что отсутствуют подходящие комплекты (первый скрин)

Пробую создать комплект, указываю в нем мой компилятор MinGW, но все равно этот комплект не получается выбрать (второй скрин)

Подскажите, пожалуйста, что мне надо настроить для начала работы?

Qt отсутствуют подходящие комплекты
Установил qt и компилятор mingw отладчик подцепился автоматически, но все равно при создании.

Отсутствуют подходящие комплекты при создании проекта
Что делать? Где их можно взять и как установить?

Что и в какие файлы пишет программа
Доброго всем здравия, телесного и духовного! Не могу разобраться как можно записать что-то в файл и.

Удалите все и поставьте сборку содержащую библиотеки Qt QtCreator и MinGw
4.8.5
5.2.1

Какую версию ставить, решать Вам, но учитывая что Вы учитесь, то лучше 4.8.5, так как она будет более соответствовать книге по которой Вы учитесь, чем Qt 5 версии

То есть, мне можно удалить все, что у меня установлено — и Qt 4.8.5, и Qt Creator, и MinGW и поставить по вашей ссылке? Спасибо, сейчас попробую.

Добавлено через 20 минут
У меня теперь получилось, что установлен Qt by Digia v4.8.5 (MinGW OpenSource), в нем есть только Qt Designer. Как в нем писать код?

Добавлено через 14 секунд
он по идее все сам подхватит

у тебя должно быть что-то подобное

в конечном итоге, у меня получилось подключить отладчик таким образом:

Был скачан и установлен Windows Driver Kit (WDK) — WDK 8 http://msdn.microsoft.com/en-u. e/hh852365
В консоли переопределена папка, откуда Qt Creator будет брать дебаггер — создана т.н. символическая ссылка на папку Debugging Tools for Windows
вот через такие команды в консоли

Судя по твоим самым верхним скринам, ты должен задать отладчик и профиль QT

Если ты качал MinGW отдельно, то зайди в MinGW/bin и выбери gdb.exe в качестве отладчика. То есть сначала из вкладки Комплекты перейди во вкладку Отладчики, там нажми Добавить и выбираешь gdb.exe

Потом зайди на вкладку Профили Qt (кстати в моей версии QCreatorа называется Qt Versions) и добавь qmake.exe из директории Qt/bin.

То есть ты понял, что у тебя должны быть установлены по крайней мере тулзины из Qt.

Далее возвращайся на вкладку Комплекты и выбирай недавно добавленные Отладчик и Профиль Qt, нажимай Применить и Ок и всё, можешь продолжать создавать проект.

QtCreator: No valid kits found

Installed just the IDE on Windows 7. I want to create a Plain C++ Project (Non-QT Project); however I get an error: No valid kits found. When I click on Options->Kits, I see the Desktop (default) kit, and it shows no errors.

Am I getting the error because I didn’t install a Qt library? If so, is there any way I can bypass downloading/installing that and just use the IDE?

11 Answers 11

Found the issue. Qt Creator wants you to use a compiler listed under one of their Qt libraries. Use the Maintenance Tool to install this.

Go to Tools -> Options. Select Build & Run on left. Open Kits tab. You should have Manual -> Desktop (default) line in list. Choose it. Now select something like Qt 5.5.1 in PATH (qt5) in Qt version combobox and click Apply button. From now you should be able to create, build and run empty Qt project.

GeneCode's user avatar

Though OP is asking about Windows, this error also occurs on Ubuntu Linux and Google lists this result first when you search for the error»QtCreator: No valid kits found».

On Ubuntu this is solved by running:

This question is answered here and here, though those entries are less SEO-friendly.

No valid Kits found The problem occurs because qt-creator don’t know the versions of your qt, your compiler or your debugger. First off, let’s solve the Qt versions. It may normally solve the others too ;).

You try to create a new project, run select a kit and then there is no kit available in the list.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *