[Interest] QImage, multithreaded app.

Alexander Syvak alexander.svk at gmail.com
Fri Sep 27 15:12:37 CEST 2013


Hello,

the method save_screenshot() is used to save a QImage object using
bool QImage::save ( const
QString<http://doc.crossplatform.ru/qt/4.6.x/qstring.html>&
*fileName*, const char * *format* = 0, int *quality* = -1 ) const

Howver, it appears that QImage is working with one I/O device and returns
false if it's busy, i.e. a thread paused at a moment of executing the save
method.

Is it better to use
bool QImage::save (
QIODevice<http://doc.crossplatform.ru/qt/4.6.x/qiodevice.html>*
*device*, const char * *format* = 0, int *quality* = -1 ) const

method instead with its own I/O device for each thread or

to create QMutexLocker in the save_screenshot() method?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130927/4a7ac53c/attachment.html>


More information about the Interest mailing list