Ok, thanks all for your comments.
I'll change them all then.
BTW what is the "right format for display? Format_ARGB32_Premultiplied
maybe?
Philippe.
Le 05-05-2017 10:25, Giuseppe D'Angelo a écrit :
Il 05/05/2017 09:05, maitai ha scritto:
But still, I have hundreds of other QPixmaps used in threads, with no
problem at all (creating, painting, etc). All is working fine for
years,
without any warning or so from Qt.
Well, not having problems doesn't imply that what you were doing was
correct...
Should I change also all these
QPixmaps to QImages (with a conversion cost at the end of the
threads)?
Yes. Note that the conversion cost may be extremely small: QPixmap
these days is simply holding a QImage in the "right format" for
display. If your QImage is already in that format, only a cheap
refcount increase is needed, not a full format conversion.
If QPixmaps are forbidden outside the main GUI thread, why is it not
written in the documentation?
It is implied by the lack of "This class is reentrant" note in QPixmap
documentation. It's also documented that way in other places, like
http://doc.qt.io/qt-5/thread-basics.html
See also slides 27+
https://conf.qtcon.org/system/attachments/104/original/multithreading-with-qt.pdf?1473018682
Cheers,
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest