Hi there list,

How can I use binary strings in QByteArrays?

In PyQt4 the following code runs smoothly:

>>> from PyQt4 import QtCore
>>> s = QtCore.QByteArray()
>>> s += '\x00'
>>> len(s)
1

Instead, with PySide, the '\x00' character is probably interpreted as a string terminator (tested the latest release on Linux and on Nokia N900):

>>> from PySide import QtCore
>>> s = QtCore.QByteArray()
>>> s += '\x00'
>>> len(s)
0

How can I insert binary data inside QByteArray?


Cheers and congrats for the cool work!
Davide


_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to