To answer your main question, it is possible to setup. Go to Projects > Open
and locate your project's outermost CMakeLists.txt
file, which should be at your project's root, next to the src folder.
QtCreator should then prompt you to configure the project's building kits. A new kit called Imported Kit
should appear checked. Press the Configure Project
button to make use of the imported kit. This kit is just QtCreator making use of the CMake configuration of your project, which was provided by KAppTemplate.
Now, regarding your intention of getting a live preview of your QML file. I'm afraid this is only possible for QtQuick UI files and Qt Design Forms, a.k.a. files that have .ui
in their extension.
While it is possible to make use of these files inside a Kirigami project, Kirigami's boilerplate code, by default, uses regular .qml files. I personally advice against taking manually written QML code and adding it to a .qml.ui
file, because it tends to make QtCreator unstable and could corrupt your .ui file.
I wouldn't depend on .qml.ui files because QML on its own is actually very easy to code. To get a better handle on QML, you can watch KDAB's Introduction tutorial to Qt / QML playlist on YouTube. With regards Kirigami and QML, the best resources to understand them are their respective official documentations.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…