Hi,

I have done that with a dual web page : QWebView and QGraphicsWebView : It
works fine in QwebView and not in a QgraphicsWebView (same as qml) :

#include <QtGui/QApplication>

#include <QWebView>

#include <QGraphicsView>

#include <QGraphicsWebView>

 static const QUrl URL = QUrl("http://download.unity3d.com/gallery/live-demos";);

 static const int RESOLUTION_X = 1920;

static const int RESOLUTION_Y = 1080;

 int main(int argc, char *argv[])

{

    QApplication a(argc, argv);

     QWebView * view = new QWebView;

    view->settings()->setAttribute(QWebSettings::PluginsEnabled, true);

    view->setUrl(URL);

     view->setFixedSize(RESOLUTION_X, RESOLUTION_Y);

     view->setWindowTitle("WebView");

    view->show();

     
//---------------------------------------------------------------------------------------------

     QGraphicsScene * scene = new QGraphicsScene();

    QGraphicsView * graphicsView = new QGraphicsView(scene);

     QGraphicsWebView * graphicsWebView = new QGraphicsWebView;

    graphicsWebView->settings()->setAttribute(QWebSettings::PluginsEnabled,
true);

    graphicsWebView->setUrl(URL);

    scene->addItem(graphicsWebView);

     scene->setSceneRect(QRect(0, 0, RESOLUTION_X, RESOLUTION_Y));

    graphicsWebView->resize(RESOLUTION_X, RESOLUTION_Y);

     graphicsView->setFixedSize(RESOLUTION_X, RESOLUTION_Y);

     graphicsView->setWindowTitle("GraphicsWebView");

    graphicsView->show();

     return a.exec();

}


2011/4/14 Girish Ramakrishnan <[email protected]>

> Hi,
> To check if it's a QML specific issue, I would suggest to check what
> happens without QML i.e using QGraphicsWebView. If you are able to
> reproduce the problem without QML, please report this at
> https://bugs.webkit.org/ and put me in the bug's cc.
>
> Girish
>
> On Thu, Apr 14, 2011 at 4:29 PM, QtNext <[email protected]> wrote:
> > Hi,
> >
> > it' s the same when I try to load this page ...
> http://unity3d.com/gallery/live-demos/players/  (a standard html page)
> >
> > I suppose it's NPAPI Plugin : the strange thing is that it's work when
> trying qwebview C++ (even with opengl backend.. for example with qt demo
> browser)  it don't works only when using qml webview !
> >
> >
> >
> > Le 14 avr. 2011 à 08:53, Girish Ramakrishnan a écrit :
> >
> >> Hi,
> >>
> >> On Thu, Apr 14, 2011 at 10:29 AM, QtNext <[email protected]> wrote:
> >>> Hi,
> >>>
> >>> I have an application done in QML. I need to be able to display a qml
> >>> webview that display a unity3D plugin web page. for example
> >>> :
> http://download.unity3d.com/gallery/live-demos/players/island.unity3d
> >>>
> >>
> >> What exactly is this unity3D "plugin"? NPAPI? QWebPluginFactory?
> >>
> >> Also, the link above points straight to the unity3d file. QtWebKit has
> >> a long pending bug of not able to render plugin content directly
> >> unless wrapped in html. IOW, create a html page with an <object> tag
> >> pointing to the island.unity3d and try displaying that in QML.
> >>
> >> Girish
> >
> >
>
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to