[Interest] Qt 5: using QPixmap outside of GUI thread

Stephen Chu stephen at ju-ju.com
Thu Sep 27 14:43:09 CEST 2012


On 9/27/12 3:36 AM, Thiago Macieira wrote:
> On quarta-feira, 26 de setembro de 2012 18.40.34, Stephen Chu wrote:
>> I was browsing the platform plugin code and find this new
>> ThreadedPixmaps capability bit. After checking QPixmap source I think it
>> means some platforms support using QPixmap in non-GUI thread?
>>
>> It looks like Cocoa and Windows platform do support this capability. Am
>> I right about this or did I read it wrong?
>
> You've read it wrong...

Figures. But what's the capability flag for?

> But, since QPixmap in Qt 5 is basically a QImage and QImages *can* be used in
> any thread, you should just change your code to use QImage instead.

I've been using QImage in threads. I just happened to this and am 
wondering if I can save a conversion from QImage to QPixmap in UI. But I 
guess if they are the same thing, the conversion isn't going to cost 
anything.

Thanks.






More information about the Interest mailing list