Re: [Interest] [SOLVED] Binary file embedded in Resources to std::istream

2013-08-05 Thread Thiago Macieira
On segunda-feira, 5 de agosto de 2013 21:08:45, Rollastre Prostrit wrote: > QByteArray bytes = f.readAll(); > > char* bb = bytes.data(); > std::string str; > for (int i=0; i { > str += bb[i]; > } > > std::stringstream stream; > stream << str; That

Re: [Interest] [SOLVED] Binary file embedded in Resources to std::istream

2013-08-05 Thread Rollastre Prostrit
Ok, I'm not sure what the problem was but I have this and it works now -in case somebody is interested: QString fName = QString::fromStdString(filename); QFile f(fName); if (!f.exists()) return; int s = f.size(); if (s <= 0) return; if (!f.open(QIODevi