QOpcUaLiteralOperand Class
OPC UA 的 LiteralOperand 类型。更多内容...
| 头文件: | #include <QOpcUaLiteralOperand> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
| qmake: | QT += opcua |
公共函数
| QOpcUaLiteralOperand() | |
| QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined) | |
| QOpcUaLiteralOperand(const QOpcUaLiteralOperand &rhs) | |
| void | setType(QOpcUa::Types type) |
| void | setValue(const QVariant &value) |
| QOpcUa::Types | type() const |
| QVariant | value() const |
| operator QVariant() const | |
| QOpcUaLiteralOperand & | operator=(const QOpcUaLiteralOperand &rhs) |
相关的非成员
(since 6.7) bool | operator!=(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs) |
(since 6.7) bool | operator==(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs) |
成员函数文档
QOpcUaLiteralOperand::QOpcUaLiteralOperand()
默认值会构建一个未设置任何参数的字面量操作数。
QOpcUaLiteralOperand::QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined)
构建一个值为value 、类型为type 的字面量操作数。
QOpcUaLiteralOperand::QOpcUaLiteralOperand(const QOpcUaLiteralOperand &rhs)
根据rhs 构建一个字面量操作数。
void QOpcUaLiteralOperand::setType(QOpcUa::Types type)
将字面量操作数的值类型设置为type 。
另请参阅 type()。
void QOpcUaLiteralOperand::setValue(const QVariant &value)
将字面量操作数的值设置为value 。
另请参阅 value()。
QOpcUa::Types QOpcUaLiteralOperand::type() const
返回文字操作数值的类型。
另请参阅 setType()。
QVariant QOpcUaLiteralOperand::value() const
返回字面量操作数的值。
另请参阅 setValue()。
QOpcUaLiteralOperand::operator QVariant() const
将此字面量操作数转换为QVariant 。
QOpcUaLiteralOperand &QOpcUaLiteralOperand::operator=(const QOpcUaLiteralOperand &rhs)
将此处QOpcUaLiteralOperand 中的值设置为rhs 中的值。
相关非会员
[noexcept, since 6.7] bool operator!=(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs)
如果 `lhs ` 的值与 `rhs` 不一致,则返回 `true `。
该函数在 Qt 6.7 中引入。
[noexcept, since 6.7] bool operator==(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs)
如果 `lhs ` 与 `rhs` 的值相同,则返回 `true `。
该函数于 Qt 6.7 中引入。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.