qurl的疑问
测试的完整的url为weather.kazovision.com/request.php?city=shanghai, 那么host应该为weather.kazovision.com, path应该为/request.php?city=shanghai第一次测试:QUrl url(weather.kazovision.com/request.php?city=shanghai);得到的host正确,但是path()是/request.php,也就是?后面的都被忽略了。可能是要编码成%号的形式,但是不知道正确的步骤第二次:QUrl url;url.setHost("weather.kazovision.com");url.setPath("/request.php?city=shanghai");这次path()对了, host()是空。最后只好这么做了QUrl url(weather.kazovision.com/request.php?city=shanghai);url.setPath("/request.php?city=shanghai");不知道正确的方法应该怎么样,还有有中文怎么办