[Qt-interest] Loading QPixmap from file with QtConcurrent causing crash
Cole, Derek
dcole at integrity-apps.com
Mon Jun 13 17:35:51 CEST 2011
Ah yes, I see that was you. Is the solution to then just use regular QGraphicsItems and override the paint method to paint my QPixmap, using the code I have already written as is, but with a QGraphicsItem instead?
________________________________________
From: qt-interest-bounces+dcole=integrity-apps.com at qt.nokia.com [qt-interest-bounces+dcole=integrity-apps.com at qt.nokia.com] on behalf of Thiago Macieira [thiago at kde.org]
Sent: Monday, June 13, 2011 11:31 AM
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Loading QPixmap from file with QtConcurrent causing crash
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
More information about the Qt-interest-old
mailing list