ArcChat is a small Qt 6 C++ and QML starter app.
The C++ side only owns process startup and the QML engine. The UI is a Qt Quick
Controls ApplicationWindow, registered through qt_add_qml_module and started
with QQmlApplicationEngine::loadFromModule("ArcChat", "Main"). That keeps the
QML in Qt's module/resource/qmlcache pipeline instead of loading a loose QML
file by URL.
- Qt 6.10 with Qt Quick, QML, and Quick Controls 2
- CMake 3.30 or newer
- Ninja for the provided presets
- sccache for the compiler cache used by the presets
- Clang (the Windows preset uses the MinGW-style
clang/clang++, notclang-cl)
On Windows the toolchain is MSYS2 UCRT64. Install everything with pacman:
pacman -S --needed \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-ninja \
mingw-w64-ucrt-x86_64-sccache \
mingw-w64-ucrt-x86_64-clang \
mingw-w64-ucrt-x86_64-clang-tools-extra \
mingw-w64-ucrt-x86_64-lld \
mingw-w64-ucrt-x86_64-qt6-base \
mingw-w64-ucrt-x86_64-qt6-declarative \
mingw-w64-ucrt-x86_64-qt6-languageserver \
mingw-w64-ucrt-x86_64-qt6-docWhen the build is driven by the MSYS2 UCRT64 cmake, Qt is discovered
automatically from the UCRT64 prefix, so no Qt6_DIR/QT_DIR is needed. If you
use a different CMake, point it at the Qt CMake package directory:
$env:Qt6_DIR = "C:\msys64\ucrt64\lib\cmake\Qt6"Windows (with C:\msys64\ucrt64\bin on PATH):
cmake --preset windows-debug
cmake --build --preset windows-debug
.\build\debug\bin\ArcChat.exeLinux:
cmake --preset linux-debug
cmake --build --preset linux-debug
./build/debug/bin/ArcChatmacOS:
cmake --preset macos-debug
cmake --build --preset macos-debug
open build/macos-debug/bin/ArcChat.appThe configure step syncs compile_commands.json to build/compile_commands.json
so clangd, clang-format, and clang-tidy can use the same database.
The workspace settings pass build/debug to qmlls and disable qmlls-triggered
CMake rebuilds. Run the configure/build commands once, then use Qt: Restart QML Language Server if completions do not appear immediately after opening the
folder.