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.
const QImage* im = ℑ
const uchar* p = im->bits();
will use the const version.
精彩评论