PDA

View Full Version : QString in bytes



estanisgeyer
23rd October 2010, 15:09
Hi,

How do I know how many bytes or KB got into a QString?
Thanks,

Marcelo E. Geyer

wysota
23rd October 2010, 16:04
Query for QString::size() and multiply by two. I don't know what you are trying to do but if you are asking about kilobytes then you probably want to use QByteArray instead of QString. The latter is only for textual data as it gets converted into Unicode. Unless of course you wish to store such large texts in QString but this is probably a bad idea.