QWebView low FPS rate
-
Hi, I'm new to qt, right now i'm using qt creator 3.1.0 based on qt 5.2.1. I'm trying to display an html page containing the "Cesium ":http://cesiumjs.org/ globe written in javascript using WebGL features.
I'm facing with fluency issues since that my application can't reach the 60 FPS rate reached with the chrome browser.
I have tried to to use both QWebView and QGraphicsWebView and to load in the page both my html file from qrc and a page directly from the internet like this one: http://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html
(loading directly from internet the application freezes).
Here there is my code:@#include <QApplication>
#include <QWebView>
#include <QWebPage>
#include <QGraphicsView>
#include <QGraphicsWebView>
#include <QGLWidget>int main(int argc, char *argv[])
{
QApplication a(argc, argv);int width = 1500; int height = 900; /* //using QWebView QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true); QWebSettings::globalSettings()->setAttribute(QWebSettings::WebGLEnabled, true); QWebView *webView = new QWebView(); webView->load(QUrl("qrc:/Resources/NewFile.html")); //webView->load(QUrl("http://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html")); webView->resize(width, height); webView->show(); */ //using QGraphicsWebView QGraphicsView *gview; QGraphicsScene *scene; QGraphicsWebView *web_view; QWebSettings::globalSettings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled, true); QWebSettings::globalSettings()->setAttribute(QWebSettings::WebGLEnabled, true); gview = new QGraphicsView(); gview->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); gview->setViewport(new QGLWidget()); scene = new QGraphicsScene(gview); web_view = new QGraphicsWebView(); scene->addItem(web_view); gview->setScene(scene); web_view->load(QUrl("qrc:/Resources/NewFile.html")); //web_view->load(QUrl("http://cesiumjs.org/Cesium/Build/Apps/CesiumViewer/index.html")); web_view->resize(width, height); gview->resize(width+50, height+50); gview->show(); return a.exec();
}@
I don't now if that issue depends on the javascript engine used by qt, or if there is the possibility to built qt for a specific machine in order to get better results, or even more i'm dealing wrong with the settings of my application. I'm just supposing.
Any ideas or suggestings?
Thanks in advance. -
Was there ever a resolution to this?