// Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <QUrl>
#include <QWebView>
#include "browser.h"


Browser::Browser(QWidget *parent)
    : QMainWindow(parent)
{
    setupUi(this);
    webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled,
                                      true);
    webView->settings()->setAttribute(QWebSettings::SiteSpecificQuirksEnabled,
                                      false);
    webView->settings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled,
                                      true);
#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
    webView->settings()->setAttribute(QWebSettings::WebGLEnabled, true);
#endif
}

void Browser::on_urlEdit_returnPressed()
{
    webView->load(QUrl::fromUserInput(urlEdit->text()));
}

void Browser::on_webView_urlChanged(QUrl& url)
{
    urlEdit->setText(url.toString());
}


// Copyright (c) 2011 Hewlett-Packard Development Company, L.P. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <QUrl>
#include <QWebView>
#include "browser.h"


Browser::Browser(QWidget *parent)
    : QMainWindow(parent)
{
    setupUi(this);
}

void Browser::on_urlEdit_returnPressed()
{
    webView->load(QUrl::fromUserInput(urlEdit->text()));
}

void Browser::on_webView_urlChanged(QUrl& url)
{
    urlEdit->setText(url.toString());
}


--- 
+++ 
@@ -11,6 +11,15 @@
     : QMainWindow(parent)
 {
     setupUi(this);
+    webView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled,
+                                      true);
+    webView->settings()->setAttribute(QWebSettings::SiteSpecificQuirksEnabled,
+                                      false);
+    webView->settings()->setAttribute(QWebSettings::AcceleratedCompositingEnabled,
+                                      true);
+#if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 2, 0))
+    webView->settings()->setAttribute(QWebSettings::WebGLEnabled, true);
+#endif
 }
 
 void Browser::on_urlEdit_returnPressed()
Enable WebGL in QtBrowser if able to.