void show(QString *s){
   //Here I want to show the value of the QString.
}

我怎样才能做到这一点??

如果您能帮助我,我会很高兴。

有帮助吗?

解决方案

不确定您要问什么 - 查看我的评论。

也许这会有所帮助?

查看 toascii(), tolatin1(), toutf8()

const char* data = s->toAscii();  // if you want ASCII encoding
data = s->toUtf8();  // if you want UTF-8 encoding

// etc.
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top