youri at pluxcustoms.nl
Tue Mar 19 08:40:16 PDT 2013
So with following snippet:
QImage im(page->viewportSize(), QImage::Format_ARGB32);
It would be possible to end up with an uninitialized QImage object? It
seems to me that I should get a segfault or something when I pass it
to the render method. Furthermore It is possible to call byteCount()
on it as well returning the correct number of bytes. I'll try calling
fill() on the object.
2013/3/19 Jocelyn Turcotte <jocelyn.turcotte at digia.com>:
> On Tue, Mar 19, 2013 at 04:08:45PM +0100, Youri Westerman wrote:
>> Thanks for your quick reply.
>> Actually I have extended the QWebPage class and overridden the
>> for a couple of seconds and then prints a console message. The thing
>> is that it works with qt4.8 and does not in qt5.
>> However I would very much like to use qt4.8 at the moment because
>> there are no packages of qt5 available for ubuntu.
>> Furthermore when I call the bits() method on a QImage painted through
>> the render method of QWebPage and inspect the data which was returned
>> data... Seems like a bug to me, but maybe I'm doing something wrong?
> sorry, I misunderstood your issue.
> I think that QImage might not be initialized in your case, so that you are looking at uninitialized memory.
> So something must be going wrong and render isn't actually writing to the memory you are seeing, but I can't say much more by looking at your code snippet.
> Calling fill() on your QImage before render might help you investigate the issue at first.
Mediapark - Studio 21
e: youri at pluxbox.nl
More information about the webkit-qt