Qt OPC UA

The Qt OPC UA module implements a Qt API to interact with OPC UA servers on top of the open62541 庫。

The QML API is still in development but are available as a technology preview. This means those parts are unstable, likely to change, and provided as a convenience only.

使用模塊

QML API

The QML 類型 是可用的透過 QtOpcUa 導入。要使用類型,添加以下 import 語句到 .qml 文件:

import QtOpcUa as QtOpcUa
					

C++ API

使用 C++ API 要求直接或透過其它依賴鏈接到模塊庫。一些構建工具對此提供專用支持,包括 CMake 和 qmake。

構建采用 CMake

使用 find_package() 命令以在 Qt6 包中定位所需的模塊組件:

find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget Qt::OpcUa)
					

采用 qmake 構建

要配置采用 qmake 構建模塊,把模塊作為 Qt 變量的值添加到工程 .pro 文件中:

QT += opcua
					

文章和指南

範例

參考

許可和歸屬

Qt OPC UA 在商業許可下是可用的來自 Qt 公司 。此外,它在自由軟件許可下也是可用的: GNU LGPL (次一般公共許可) 第 3 版 ,或 GNU GPL (一般公共許可) 第 2 版 。見 Qt 許可 進一步瞭解細節。

Furthermore, Qt OPC UA in Qt 6.8.5 may contain third-party modules under following permissive licenses:

Open62541, version 1.3.11

Mozilla Public License 2.0 and Creative Commons Zero v1.0 Universal and Creative Commons Attribution Share Alike 4.0 International and BSD 3-Clause "New" or "Revised" License and Apache License 2.0 and MIT License