[Kde-bindings] QByteArray

David Hallas Andersen david at hallas.nu
Thu Jan 18 11:18:07 UTC 2007


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?

-- 

Cheers...

/David

On Thursday 18 January 2007 11:48, Richard Dale wrote:
> On Thursday 18 January 2007 10:30, David Hallas Andersen wrote:
> > Hi All,
> >
> > I am trying to write some code using QByteArray, but I keep getting
> > 'undefined method' errors when accessing functions from the derived
> > template class QMemArray. And I cant find the functions using rbqtapi
> > tool. Is this a known issue? And is there any way I can bypass it?
>
> There are a few more functions that have been added that aren't in the
> Smoke library, and so you can't see them via the rbqtapi tool:
>
> irb(main):009:0> Qt::ByteArray.instance_methods(false).sort
> => ["data", "data=", "length", "setRawData", "size", "to_s"]
>
> I just added to minimum to make it usable for passing to methods that
> expect a Qt::ByteArray, such as those that create a Qt::DataStream with the
> Qt::ByteArray being written to via the stream rather than directly.
>
> Which methods are you missing - perhaps I should add them?
>
> > I am using QtRuby 3.3 bindings.
>
> There are lot more methods in the version of Qt::ByteArray in the Qt4
> QtRuby bindings, but that doesn't help with your current problem.
>
> -- Richard



More information about the Kde-bindings mailing list