Hi,
I have a application that uses Sqlite to store data and also the option to backup this data.
I wrote the following code but is not working.
Code:
QString fileName = QFileDialog::getSaveFileName(this,tr("Backup Database"),QDir::homePath(),filter); if(!fileName.isEmpty()){ filePath.append("/database"); //Error Message return; } //Error Message return; } QByteArray data; sourceStream>>data; data = qCompress(data); destStream<<data; sourceFile.close(); destFile.close(); }
The destination file is getting created but it's size is only 10 Bytes.
Can someone please tell me what is wrong with the code ?
Thanks a lot.