Hello
I use the following code to export my diagram into a .jpg file.
QString fileName = QFileDialog::getSaveFileName(this, tr("Export diagram"), QDir::currentPath(), "Images (*.jpg; *.jpeg)"); QFile file(fileName); if (!file.open(QIODevice::WriteOnly|QFile::WriteOnly)){ QMessageBox::warning(0,tr("File could not be saved"), tr("\n File could not be written to drive.")); }else{ ui->dia_simulation->saveJpg(fileName, 0, 0, 2.0, 100, 100, QCP::ruDotsPerInch); }
On my computer it works, but on a friends computer (same model) the exported file has a length of 0 bytes.
What am I doing wrong?
Thomas