[Interest] Is it possible to use QPixmap from non guy thread in Qt5?

Samuel Rødal samuel.rodal at digia.com
Fri Feb 15 09:05:55 CET 2013


On 02/14/2013 09:15 AM, Иван Комиссаров wrote:
> In Qt4, i always got warning when trying to use QPixpap from thread other than the gui-thread.
>
> However i don't see that warning in Qt5. Also, documentation only says that i can use painter from non-gui thread on a QImage, but doesn't say that i can't use it on a pixmap:)
>
> Also, my test shows that i's possible to use painter on a pixmap in non-gui thread and there are no warnings in console.
>
> So, whom i should believe - my eyes or a QImage documentation?)

Since QPixmap is implemented on pretty much all platforms as a QImage in 
Qt 5 you probably won't get any errors. I'd stick with using QImage 
directly though in case that should ever change.

--
Samuel




More information about the Interest mailing list