I stumble upon a problem, and can\'t find a solution.
So what I want to do is uncompress data in qt, using qUncompress(QByteArray), send from www in gzip format. I
You also forgot dataPlusSize.append(data);. However, that won't solve your problem. The problem is that while gzip and zlib have the same compressed data format, their headers and trailers are different. See: http://www.zlib.net/zlib_faq.html#faq18
qUncompress uses the zlib uncompress, so it can only handle the zlib format, not the gzip format. It would need to call the gzXXXX functions to handle the gzip format.
The reason that qUncompress can handle output from PHP's gzcompress is that gzcompress compresses the given string using the ZLIB data format. See: http://php.net/manual/en/function.gzcompress.php
As CiscoIPPhone mentioned, you'll need to write your own to functions to handle gzip data.