开发者

QImage and its const bits() const method

开发者 https://www.devze.com 2022-12-22 14:58 出处:网络
Qt\'s QImage has two methods: uchar* QImage::bits(); const uchar* QImage::bits() const; But how to 开发者_运维技巧call a second one? Calling

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消