QString temp,frameGeo;
frameGeo = temp.setNum(frameGeometry().x())+","+ temp.setNum(frameGeometry().y())+","+ temp.setNum(frameGeometry().width())+","+ temp.setNum(frameGeometry().height());
本来我是希望得到框架的左顶点坐标和框架的长宽,但结果一直不正确,最后分析了一下,是上面的代码出现了问题。
大概分析了一下,似乎在temp 字符串生活的过程中发生了字符的覆盖,最后导致 temp.setNum(frameGeometry().x()) temp.setNum(frameGeometry().y()) temp.setNum(frameGeometry().width()) temp.setNum(frameGeometry().height()) 结果相同,与猜想不符。这四个值都和第一个结果相同,不知道为什么?具体怎样覆盖的?求解!