1.IDE:QTCreator
2.实验
(1)QString采用Unicode编码,即16位QChar
(2)
str=str.setNum(total,16); //将total转换为16进制
str=str.setNum(total,2); //将total转换位2进制
str=str.setNum(total,10); //将total转换为10进制
/*下面几个等效*/
str=str.sprintf("%.2f",total); //保留两位小数
str=QString::number(total,'f',2);
str=QString::asprintf("%.2f",total);
str=str.setNum(total,'f',2);
(3)append,preappend,indexof,lastindexof,.................(simplified会去掉首尾空格,并且合并内部的空格,如果有相连的多个空格只留下一个)
(4)IsNull,IsEmpty,contains
(5)section