[Interest] QImage, multithreaded app.
Thiago Macieira
thiago.macieira at intel.com
Fri Sep 27 20:33:12 CEST 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130927/f98dbc49/attachment.sig>
More information about the Interest
mailing list