[webkit-qt] Streaming input for a snapshot
Aris van Dijk
arisvd at gmail.com
Wed May 26 03:35:19 PDT 2010
I've a question about how to use stdin to pass streaming HTML and render a
snapshot of it. I'm trying to alter the 'webcapture' program such that it
works for me. However, my knowledge of c++ is too limited to complete :(.
Could anyone help me with this? I have the following code:
in << std::cin;
After that I would like to use the QByteArray input to load a QWebFrame:
baseUrl); //or "text/html"
However, the program doesn't seem to work; it seems the input is empty and
the program does not exit. What am I doing wrong?
Moreover, I would like to stream the rendered QImage image to stdout as
well. Would the code be something like this?:
QImage image; //some image that was rendered to
image.save(&buffer, "PNG"); // writes image into the buffer in PNG format
std::cout << in;
Or are there more efficient ways to get a streaming result?
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-qt