char *str; QString path; str = path.toAscii().data();//主要是toAscii的转换,还可以toInt。。。。 printf("%s\n",str);