After a bit of research I wasn't really able to understand why this happens.

In a nutshell, I'm calling QWebView and feeding a .swf into it and it works. However it goes out of its frame/layout, and I'm not sure why.

For a representation, see: enter image description here

As you may see, the dark greyish rectangle is where QWebView was placed, however the .swf going into it is represented out of it in the top left corner.

How to recreate this problem:

I literally just placed a QWebView using the designer, added all the includes needed etc. and added 3 lines of code to mainwindow.cpp :

    QWebSettings *settings = ui->webView->settings();
    settings->setAttribute(QWebSettings::PluginsEnabled, true);
    ui->webView->load(QUrl("http://www.w3schools.com/html/bookmark.swf"));

I also tried opening an html file with the .swf wrapped in it, but the same problem occurs.

Am I doing something wrong? Is it a known bug? Thanks in advance.

有帮助吗?

解决方案

Apparently this is a known bug with Qt, will be fixed next release.

Source: https://bugreports.qt-project.org/browse/QTBUG-33053

What I did to fix was basically compile QT again with the fix included.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top