qt 打印 Qstring

来源:互联网 发布:cf无限榴弹软件 编辑:程序博客网 时间:2024/05/23 11:51

Qt提供qPrintable()宏来执行和toAscii().constData()一样的功能:



QString str = "polluter pays principle"; 

printf("User: %s\n", qPrintable(str));
QString str = "polluter pays principle";
原创粉丝点击