blob: d5d66e022926841a1edae4e9e553913adf569941 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
# BobinkQtOpcUaAppTemplate
App template for [BobinkQtOpcUa](deps/BobinkQtOpcUa/README.md) — a QML library that wraps Qt OPC UA into simple, declarative components.
## Prerequisites
- CMake >= 3.16, Ninja
- Qt 6.10.2+ (with `qt-cmake` in PATH)
- OpenSSL development headers
## Build
```bash
git clone --recurse-submodules https://github.com/Bobink-UTT/BobinkQtOpcUaAppTemplate.git
cd BobinkQtOpcUaAppTemplate
qt-cmake -S . -B build -G Ninja
qt-cmake --build build --parallel
```
The first configure automatically builds the bundled dependencies (open62541 and QtOpcUa) from git submodules. Subsequent builds skip this step.
### Run
```bash
./build/bin/BobinkQtOpcUaAppTemplate
```
## Usage
Edit `Main.qml` to build your app. The `Bobink` QML module is already available:
```qml
import Bobink
ApplicationWindow {
// Connect, monitor nodes, write values — see the API docs below.
}
```
For the full API (connections, authentication, node monitoring, writing, discovery, PKI), see the [BobinkQtOpcUa README](deps/BobinkQtOpcUa/README.md). A complete working example lives in `deps/BobinkQtOpcUa/demo/`.
## Editor setup
The build generates `.qmlls.ini` files so the QML Language Server can resolve all imports (Qt and Bobink) out of the box.
**Neovim** — works automatically if your LSP config picks up qmlls.
**Qt Creator** — enable the language server under Edit > Preferences > Language Client > QML Language Server.
## Project structure
```
CMakeLists.txt Build configuration
main.cpp Entry point (plugin path, logging)
Main.qml Your app — edit this
deps/
BobinkQtOpcUa/ Library submodule (builds open62541 + QtOpcUa)
```
|