Qt开发字符串转换

 

Qt开发字符串转换

 

QtString转化为char*;

QString fileName = QFileDialog::getOpenFileName(this, tr(""), QDir::currentPath(), tr("*.co;;*.gr)"));

QString PointsFileName = fileName ;

QByteArray bapPointsFileName = PointsFileName.toLatin1();

const char *pPointsFileName = bapPointsFileName.data();

你可能感兴趣的:(Qt开发字符串转换)