-2

How to implement on Qt logic of PHP functions unpack?

Baltazor
  • 13
  • 4
  • Please explain further more what you are trying to do. – Max Doumit Mar 11 '13 at 20:53
  • In PHP I call unpack('N*', "Some String") and it return me an array. I want to take in Qt a QVariantMap the same as an array in PHP after unpacking "Some String" – Baltazor Mar 11 '13 at 21:02

1 Answers1

0

Basically, you are looking at using QByteArray, and typecasting the output to some format.

http://qt-project.org/doc/qt-4.8/qbytearray.html#details

Another way to think about this, is you are taking some structure or type, turning it into a long string of ones and zeros, and then on the other end you are switching it back.

Hope that helps.

phyatt
  • 18,472
  • 5
  • 61
  • 80