如何在Qt上发送/接收http数据?
我正在尝试做一些事情,比如一个简单的curl 函数,它可以发送Get/Post 请求并在标签中设置响应文本。
我读过有关 QNAM 的内容,但这很复杂。
有没有简单的方法可以做到这一点(没有所有信号和槽)?
I'm trying to do some thing like a simple curl function that can do like sending a Get/Post request and set the response text in a label.
I have read about QNAM, but that's complicated.
Is there any simple way to do that(without all the signal and slot) ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我想您会想阅读 QHttp 类
它没有需要太多的信号和槽工作,但是如果您不想使用它们,您可能需要考虑 Qt 的替代品,因为它非常依赖它们。
I imagine you'll want to read up on the QHttp class
It doesn't require too much work with signals and slots, however if you don't want to use them you may want to consider an alternative to Qt as it relies on them quite heavily.
此外,它可能对 QtCUrl 绑定很有用。对于熟悉curl的人来说非常简单。
Also, it could be useful QtCUrl binding. It is very simple for those who is familiar with curl.