[Development] Why does QLabel::pixmap() return `const QPixmap*`?

Thiago Macieira thiago.macieira at intel.com
Mon Dec 1 09:00:19 CET 2014


On Monday 01 December 2014 07:40:50 Knoll Lars wrote:
> Exactly that. It’s been like that since Qt 1 times, where QPixmap was a
> non shared class you had to instantiate on the heap. We never changed this
> accessor for source compatibility reasons (I remember discussing this with
> Matthias when we moved from Qt 3 to Qt 4  ), but I agree it feels very
> wrong these days to return a pointer to a pixmap.

Add a QPixmap::labelPixmap() const; and deprecate the old.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list