View Full Version : Does sizeof() operator work with QT Objects?
blue_sky
6th September 2013, 16:26
if I ve an QPixmap Object holding a image file.Does sizeof() work with this object to determine the number of bytes taken by that picture when loaded in memory?
Thank you in advance.
wysota
6th September 2013, 21:57
No. sizeof() returns size of the object, not its data.
anda_skoa
7th September 2013, 10:54
If you want to know the size of an image in bytes you load into a QImage and use its byteCount() method.
Cheers,
_
wysota
8th September 2013, 08:20
If you want to know the size of an image in bytes you load into a QImage and use its byteCount() method.
However the size depends on the image format used and in most cases will be different than what size QPixmap occupies.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.