Hello,
While flash plugin works fine in a standalone Widget , if the QWebView
is embed in a QGraphicsScene, the Flas content i not diplayed and the
folowin error is displayed :
<Error>: CGContextSaveGState: invalid context
<Error>: CGContextTranslateCTM: invalid context
<Error>: CGContextRestoreGState: invalid context
Sample application to reproduce the problem :
#include <QtGui>
#include <QtWebKit>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QGraphicsView view;
QGraphicsScene scene;
app.setApplicationName("testApp");
QString filename =
"http://labs.trolltech.com/blogs/2008/12/02/widgets-enter-the-third-dimension-wolfenqt/";
QWebView *webView = new QWebView();
webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
webView->load(filename);
// Toggle the display mode :
//
// true : the webView is diplayed as a main widget of the
application, everything works fine
// false: the webView is loaded in a ProxyWidget within a scene, the
flash content is not displayed,
// resizing te window generates the folowing messages :
// <Error>: CGContextSaveGState: invalid context
// <Error>: CGContextTranslateCTM: invalid context
// <Error>: CGContextRestoreGState: invalid context
bool standAlone = false;
if (standAlone)
{
webView->show();
}
else
{
view.setScene(&scene);
view.show();
QGraphicsProxyWidget* proxy = new QGraphicsProxyWidget();
proxy->setWidget(webView);
scene.addItem(proxy);
proxy->show();
}
return app.exec();
}
--
Luc Devallonné
Cell: +41 78 751 32 15
Skype: luc.devallonne
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback