可能在传递参数的过程中, 传的一是个bool值,而后面,在参数的转换传递过程中,只能传一个QString, 最后又需要得到一个bool值,这时就可以使用这种方法:
1 bool testParam; 2 QString tempParam = QString::number(testParam); 3 //上面是bool 转QString;1 QVariant tempValue = tempParam; 2 bool tempFinished = tempValue.toBool(); 3 //这样就把QString 类型的转换回去了。
上一篇:DALSA工业相机SDK二次开发(图像采集及保存)C#
下一篇:Qt 读写txt文本文件
Qt









