tags:

views:

32

answers:

1

Qt's QImage has two methods:

uchar* QImage::bits();
const uchar* QImage::bits() const;

But how to call a second one? Calling

const uchar* p = image.bits();

Will call a non-const version O_O.

+2  A: 
const QImage* im = ℑ
const uchar* p = im->bits();

will use the const version.

Ben Voigt