Qt例程之http客户端

void QHttp::done(bool error)
This signal is emitted when the last pending request has finished; (it is emitted after the last request’s requestFinished() signal).
error is true if an error occurred during the processing; otherwise error is false.
//当最后挂起的请求完成后,发射此信号.当在处理时错误发生,erro是true

int QHttp::setHost(const QString & hostName, quint16 port = 80)
Sets the HTTP server that is used for requests to hostName on port port.
//设置http服务器,请求到hostname与port

int QHttp::get(const QString & path, QIODevice * to = 0)
Sends a get request for path to the server set by setHost() or as specified in the constructor.
//为path 发送一个get请求 到由setHost设置的服务器

int QHttp::close()
Closes the connection; this is useful if you have a keep-alive connection and want to close it.
//关闭连接

QString QHttp::errorString() const
Returns a human-readable description of the last error that occurred.
//返回发生的最后错误描述

你可能感兴趣的:(qt)