Hello again.
I have problems with saving qImage to jpg.
On the very begining i was trying to use QPixmap::save() like this:
if(!saveFile.isEmpty())
if(!tlo->save(saveFile,".JPG",100));
QString saveFile=QFileDialog::getSaveFileName(this,tr("save"),QDir::homePath());
if(!saveFile.isEmpty())
if(!tlo->save(saveFile,".JPG",100));
To copy to clipboard, switch view to plain text mode
but it didn't work(no errors, just was not saving file), so i have tried qimagewriter and... on the one computer it's working on the other not... the code is:
if(!saveFile.isEmpty()){
writer.write(*tlo);
if(writer.canWrite())
qDebug("i can write");
else
qDebug("i can't write");
qDebug()<< writer.errorString();
}
QString saveFile=QFileDialog::getSaveFileName(this,tr("save"),QDir::homePath());
if(!saveFile.isEmpty()){
QImageWriter writer(saveFile);
writer.write(*tlo);
if(writer.canWrite())
qDebug("i can write");
else
qDebug("i can't write");
qDebug()<< writer.errorString();
}
To copy to clipboard, switch view to plain text mode
it shows me "i can write" co there is no problems with opening file to write and no problems with qimage... the error line is "unknown problem"
any ideas about the solution? any ideas why save() didn't work? i really will appreciate help.
thank
Bookmarks