[webkit-qt] Help with aliased text

noam.rosenthal at nokia.com noam.rosenthal at nokia.com
Wed Oct 19 07:59:30 PDT 2011


Hi Leander
Hello,


I've been using the latest QtWebKit port ( the one that ships with the Qt 4.8.0 RC ) on Mac OS X 10.7  and testing the accelerated compositing and CSS3 animations. My small example uses the following code:


    QApplication a(argc, argv);

    QGraphicsScene scene;

    QGraphicsView gview(&scene);

    QGraphicsWebView webView;

    gview.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing| QPainter::HighQualityAntialiasing |QPainter::SmoothPixmapTransform);

    webView.setUrl(QUrl("http://www.satine.org/research/webkit/snowleopard/snowstack.html"));

    //webView.setUrl(QUrl("http://www.html5test.com<http://www.html5test.com/>"));

    scene.addItem(&webView);

    gview.setProperty("size",QSize(800,600));

    gview.setViewport(new QGLWidget());

    gview.setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);

    gview.show();

    return a.exec();

You should enable tiled backing store as well.
QWebSettings::globalSettings()->setAttribute(QWebSettings::TiledBackingStoreEnabled, true)

Otherwise you're rendering all web pages with the GL paint engine, which is probably not what you want.

No'am
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20111019/3e4f97b5/attachment-0001.html>


More information about the webkit-qt mailing list