How to write ByteArray into a text file?
I tried the code below but it is not working.
Code:
Code:
int id = record.value(0).toInt(); QSqlQuery query; if(query.next()) { { file.write(meshbyte); file.close(); } }
Printable View
How to write ByteArray into a text file?
I tried the code below but it is not working.
Code:
Code:
int id = record.value(0).toInt(); QSqlQuery query; if(query.next()) { { file.write(meshbyte); file.close(); } }
Please define "not working".
May be it don't work because you forgot 'query.first()' after the SELECT statement?
Do query.exec(), query.next() and file.open() return true?