tags:

views:

68

answers:

3

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't see any equivalent method. Is there something I'm missing?

+1  A: 

You want QUrl::setEncodedUrl and QUrl::toEncoded

sje397
+2  A: 

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

Stephen Chu
A: 

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

liaK