QGraphicsWebView and Flash performance issue

  • Greetings,

    It seems that the performance of Flash is not as good in a QGraphicsWebView than in a QWebView.

    I did a small test example to demonstrate this.

    I'm running this on Windows 7 + Qt 4.7.1 on an i7 but I did reproduce it on OS-X :
    @#include <QtGui/QApplication>

    #include <QWebView>
    #include <QGraphicsView>
    #include <QGraphicsWebView>

    static const QUrl URL = QUrl("http://www.warriorlabs.net/index.php?app=ccs&module=pages&section=pages&folder=/music&id=26");

    static const int RESOLUTION_X = 1920;
    static const int RESOLUTION_Y = 1200;

    int main(int argc, char *argv[])
    QApplication a(argc, argv);

    // Instructions :
    // Start the video by clicking inside each web view.
    // The QWebView is performing better than the QGraphicsWebView with the very same HTML.
    // QWebView > Good performances
    QWebView * view = new QWebView;
    view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    view->setFixedSize(RESOLUTION_X, RESOLUTION_Y);
    // QGraphicsWebView > Slow performances
    QGraphicsScene * scene = new QGraphicsScene();
    QGraphicsView * graphicsView = new QGraphicsView(scene);
    QGraphicsWebView * graphicsWebView = new QGraphicsWebView;
    graphicsWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
    scene->setSceneRect(QRect(0, 0, RESOLUTION_X, RESOLUTION_Y));
    graphicsWebView->resize(RESOLUTION_X, RESOLUTION_Y);
    graphicsView->setFixedSize(RESOLUTION_X, RESOLUTION_Y);
    return a.exec(&#41;;


    Anyone knows why this happens ? Is this due to caching or graphical performances ?

    I'm not 100% sure about this but it seems that if I load the QWebPage with the QGraphicsWebView and then switches it inside the QWebView I inherit the poor performances. Could this come from an external factor like QWebSettings ?

    Thanks for your insights.


  • I experienced the same problem. Does probably anyone have a workaround for this?

    Best Regards,

  • I guess we'll have to wait for Qt 4.8 and QtWebkit 2.2.


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.