如何将bool值转化为QString
要将bool值转化为QString,可以使用QString的静态函数fromBool()。例如:
bool b = true;
QString str = QString::fromBool(b);
这样,bool值b会被转化为相应的QString对象str。如果b为true,str将被设置为"true";如果b为false,str将被设置为"false"。
原文地址: https://www.cveoy.top/t/topic/iy51 著作权归作者所有。请勿转载和采集!