Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
6.8.2
-
None
Description
The docs say:
QImageWriter::UnknownError
An unknown error occurred. If you get this value after calling write(), it is most likely caused by a bug in QImageWriter.
{}I always get this error after calling write(). This value is the default value of the error variable. If there is no error, UnknownError is always returned.
Example:
#include <QtGui/QImage> #include <QtGui/QImageWriter>int main() { QImage img(10, 10, QImage::Format_ARGB32); img.fill(Qt::red); QImageWriter w("out.png"); Q_ASSERT(w.canWrite()); w.write(img); // Write succeeded, but we still have UnknownError which is bad according to the docs qDebug() << "Error: " << (w.error() == QImageWriter::UnknownError) << w.errorString(); return 0; }