QString s = "hello world";QByteArray b = s.toUtf8();char* p = b.data();func(s.toUtf8().data()); https://www.cnblogs.com/linyugang/p/15498239.html