[Qt5-feedback] Immutable QPixmaps

gunnar.sletta at nokia.com gunnar.sletta at nokia.com
Fri May 13 18:11:42 CEST 2011


On May 13, 2011, at 4:48 PM, ext Samuel Rødal wrote:

> On 05/13/2011 04:31 PM, ext Tom Cooksey wrote:
>> One design feature I remember would have been quite nice in Qt4 was to
>> have the concept of immutable QPixmaps and possibly QImages too. That
>> way, you can use a compressed texture as a QPixmap and never have to
>> worry that someone might at a later date open a painter on it.
> 
> QPixmap will probably not play a big role in QtQuick2, scene graph 
> currently does explicit texture management on its own (with the 
> QSGTexture etc classes).
> 
> There's also the option to make custom scene graph nodes where you 
> supply a raw texture id directly (using QSGSimpleTextureNode).
> 

For compressed textures, one can always use the ETC image provider in QML. This allows you to load compressed textures as Image elements. Inside the scene graph API, they are passed around as QSGTexture subclasses.

The immutable pixmap class you are looking for should be mostly covered by the QSGTexture class.

-
Gunnar



More information about the Qt5-feedback mailing list