diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -183,6 +183,29 @@ target_compile_definitions(YourApp PRIVATE QTOPCUA_PLUGIN_PATH="${QTOPCUA_INSTALL_DIR}/plugins") ``` +## Editor setup (QML Language Server) + +The build generates `.qmlls.ini` files so that qmlls can resolve both Qt and local Bobink QML imports. + +**Neovim** — works out of the box if your LSP config picks up qmlls. + +**Qt Creator** — enable the language server under Edit > Preferences > Language Client > QML Language Server. + +**QML formatting** — a `.qmlformat.ini` is included at the project root. `qmlformat` picks it up automatically from the terminal (`qmlformat -i file.qml`). Qt Creator does not respect `.qmlformat.ini` or its own Code Style settings when formatting ([QTCREATORBUG-29668](https://bugreports.qt.io/browse/QTCREATORBUG-29668)) — use the command line instead. + +**Submodule users** — since `QT_QML_GENERATE_QMLLS_INI` and the demo are only enabled for top-level builds, add these to your own project: + +```cmake +# Enable .qmlls.ini generation +set(QT_QML_GENERATE_QMLLS_INI ON CACHE BOOL "") + +# Add the build QML directory so qmlls can resolve the Bobink import +qt_add_qml_module(YourApp + URI YourApp + ... + IMPORT_PATH "${CMAKE_BINARY_DIR}/qml") +``` + ## Project structure ``` |
