[Kde-bindings] QByteArray

Richard Dale rdale at foton.es
Thu Jan 18 11:42:08 UTC 2007


On Thursday 18 January 2007 11:18, David Hallas Andersen wrote:
> Hi Richard,
>
> thanks for your quick reply. I am working on a class that uses QSocket to
> read data using the readAll call (which returns a QByteArray). And then i
> need to analyze the data, using find, at and operator[]. But perhaps there
> is a different way I can achieve the same?
Perhaps you can just use Qt::ByteArray.to_s method to convert to a string (it 
will make a byte for byte copy) and then use the Ruby String methods to 
examine the contents?

-- Richard



More information about the Kde-bindings mailing list