[Interest] QPixmap and threads
annulen at yandex.ru
Fri May 5 16:19:36 CEST 2017
05.05.2017, 11:26, "Giuseppe D'Angelo" <giuseppe.dangelo at kdab.com>:
> 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
>> 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.
Except cases/platforms when QPixmaps are native-backed
> 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
> See also slides 27+
> Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
> KDAB - Qt, C++ and OpenGL Experts
> Interest mailing list
> Interest at qt-project.org
More information about the Interest