Search code examples
qtqt-creator

Design Mode requires a valid Qt kit, but installed and are able to run?


In Qt Creator it is possible to run the program clicking the green play button (using PySide6), but not edit the qml file in Design mode, where it gives the error "Line 0: The Design Mode requires a valid Qt kit" inside the design view. I created a project and selected Qt for Python (qml).

But I have installed several gb of the newest Qt version during installation? I have also selected the correct python env in the options.

When I create a non-qml project, but add a .qml file later a popup error says:

"The QML emulation layer (QML Puppet) cannot be built because the Qt version is too old or it cannot run natively on your computer. The fallback emulation layer, which does not support all features, will be used"

The Qt version is 6.2.2 and the OS is Windows 11. It is possible to use design mode in Qt Design Studio.


Solution

  • I meet the same problem and my environment is similar, choose EditPreferences and enter the Kits. Then select a Qt version and a kit you like (the type of qmake shall be the same, for instance, both of them is msvc), and remember to apply the changes.

    After that, go back to the form editor and it works well. What confused me is that I must repeat the steps above each time I want to use Qt, the config seems to not be saved correctly. (The Qt version is 5.1.2 and the OS is Windows 11)

    PS: After selecting the kit, you need to restart Qt.