Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须将 QTextCharFormat 转换为 QJsonValue 因为它必须在 Json 消息中从客户端传输到服务器,但我不知道该怎么做。谁能帮我吗?
如果它是一个 qtquick 应用程序,您可以在 qml 代码之间使用 javascript 函数并从 js 函数获取返回的 json var。
将 QtextCharFormat 转换为 char,然后将其传递给 js 函数。