>
> > The other question is: does anyone know why the qt-plugin object does
> not
> > appear when we use the print preview and print options? Is it not
> properly
> > rendered by those functions?
>
> I think this won't work in Qt 4.0.0. Your widget is not drawn with the
> QPrinter used for printing, so it will not show up. For later versions we
> will find a solution, e.g. using QWidget::render in
> WebCore::Widget::paint.
>

What if, instead of printing, we try to generate an image file for the page?
I've tested a code like that and the output image doesn't show the
qt-plugins neither.

        QSize size = getSize();  // getSize gets current page size
        QWebFrame * frame = page()->mainFrame();  // gets a pointer to
current page's main frame
        QPixmap screenshot(size);
        QPainter painter(&screenshot);
        frame->render(&painter, QRect(QPoint(0,0), size));
        QString fileOut = new QString("test.png");
        screenshot.save(fileOut);

Why does the output image render the whole page, except the qt-plugins? Is
that the same problem as in printing? Could we have a fix for the QT 4.4
final version?

)(s, Beto

Reply via email to