[Interest] QByteArray to quint64

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Sep 16 12:31:29 CEST 2015


Il 16/09/2015 12:28, Tom Isaacson ha scritto:
> If I want to convert a QByteArray to quint32 I can use:
>      quint32 result = QByteArray("1234").toUInt();
>
> But what if I want to convert a longer array to quint64? Writing cross-platform code requires a mix of _strtoi64() and strtoull(). Is there a simple way of doing this in Qt?

Are you talking about converting the decimal representation using the C 
locale? toULongLong().

HTH,

-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4068 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150916/d93142da/attachment.bin>


More information about the Interest mailing list