小编sai*_*895的帖子

QJsonValueRef 与 QJsonValue

在 Qt 的 JSON 实现中,在QJsonObject类中,运算符有两种实现(文档here):

QJsonValue QJsonObject::operator[](const QString & key) const;
QJsonValueRef QJsonObject::operator[](const QString & key);
Run Code Online (Sandbox Code Playgroud)

首先,与返回QJsonValueRef相比,返回有QJsonValue什么优势?其次,该值如果我只是说的一样会被退回root['time'],其中root的一个QJsonObject

c++ qt qt5 qtcore

5
推荐指数
1
解决办法
5053
查看次数

标签 统计

c++ ×1

qt ×1

qt5 ×1

qtcore ×1