On sexta-feira, 27 de setembro de 2013 16:12:37, Alexander Syvak wrote:
> 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.

Any thread? What is this other thread doing? Also, threads don't pause except 
if you're using the debugger.

It's far more likely that your mistake can be found in what this other thread 
is doing.

> 
> 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?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to