开发者

URL encode in Qt4

I'm trying to encode a URL while using Qt 4. It looks like in Qt 3, the method was QUrl::encode, but apparently QUrl was rewritten from Qt 3 to Qt 4. I looked in the documentation and didn'开发者_JS百科t see any equivalent method. Is there something I'm missing?


Also use QUrl::toPercentEncoding to encode any QString without forming it to a URL.


You want QUrl::setEncodedUrl and QUrl::toEncoded


Qt3 support members for QUrl points to Stephen Chu's answer. Just added the link since it might be useful..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜