[Qt-interest] Loading QPixmap from file with QtConcurrent causing crash

Thiago Macieira thiago at kde.org
Mon Jun 13 17:31:52 CEST 2011


Em Monday, 13 de June de 2011, às 15:22:25, Cole, Derek escreveu:
> I think i read somewhere that you can only use QPixmap in a thread other
> than the main GUI thread. is this correct?

Yes. You may have read that in the email I sent 18 hours ago to this mailing 
list.

> I have some code that is trying to create a new QGraphicsPixmapItem from a
> file. I have to do this for many items, all coming from the same file. I am
> trying to make this work threaded, so the GUI doesnt freeze while all these
> tile items are loading.

You cannot create QGraphicsPixmapItems from a thread that isn't the GUI 
thread.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110613/45e8466a/attachment.bin 


More information about the Qt-interest-old mailing list