Domanda

I received the following QUrlInfo string from QFtp::listInfo(QUrlInfo) and the correct URL fragment is actually set to ©®§µ here in a test.

But QUrlInfo.name() returns a String containing ©®§µ. I realize I must encode it somehow, but how do I do that?

È stato utile?

Soluzione

This should work:

QString::fromUtf8(info.name().toAscii());
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top