m_nBuffSize=in.readRawData(m_pBuff,nSize); //读取失败则结束操作 if(m_nBuffSize==-1) { returnfalse; } //验证读取的数据,通过转化成图片显示出来 if(!pix.loadFromData(reinterpret_cast<unsignedchar*>(m_pBuff),m_nBuffSize)) { returnfalse; } returntrue; } 1. 2. 3. 4. 5. 6. 7...
xxxx = data.at(i).toInt(&ok,base);// xxxx你存放数据的空间,base:你需要转换成的进制,看内容应该是16 } } while (!line.isNull());
}//验证读取的数据,通过转化成图片显示出来if(!pix.loadFromData(reinterpret_cast<unsignedchar*>(m_pBuff), m_nBuffSize)) {returnfalse; }returntrue; } 通过二进制读取QPixmap boolGetPix(QPixmap &pix,QString &strFileName){QFilefile(strFileName);char*m_pBuff =NULL;intm_nBuffSize;if(!file.o...