I'm not sure you can't use QPixmap, I think it more what you expect to use it 
for.
Back int he day I wrote a code to capture QML animation frames to disk. PNG is 
a compressed format. The performance of this was not good. So I made a save 
thread and passed the Pixmap to the thread via a signal which allowed the other 
cores to do the compression and save and it went much faster. I think the issue 
is QPixmaps can only be created in the GUI thread since they are tied to the 
graphics hardware metrics. (Now that we're using GL in many cases, it may not 
matter?)

Anyone care to weigh in?




________________________________
 From: Samuel Rødal <[email protected]>
To: [email protected] 
Sent: Friday, February 15, 2013 3:05 AM
Subject: Re: [Interest] Is it possible to use QPixmap from non guy thread in 
Qt5?
 
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

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to