equal
deleted
inserted
replaced
34 void BrowserWrapper::init() |
34 void BrowserWrapper::init() |
35 { |
35 { |
36 mWebView = new QGraphicsWebView(); |
36 mWebView = new QGraphicsWebView(); |
37 mWebView->setZoomFactor(1.5); |
37 mWebView->setZoomFactor(1.5); |
38 mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); |
38 mWebView->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks); |
|
39 mWebView->settings()->setAttribute(QWebSettings::PluginsEnabled, true); |
|
40 mWebView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true); |
|
41 mWebView->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); |
|
42 mWebView->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, true); |
39 connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&))); |
43 connect(mWebView, SIGNAL(linkClicked(const QUrl&)), this, SIGNAL(linkClicked(const QUrl&))); |
40 |
44 |
41 QGraphicsLinearLayout* vLayout = new QGraphicsLinearLayout(this); |
45 QGraphicsLinearLayout* vLayout = new QGraphicsLinearLayout(this); |
42 vLayout->setOrientation(Qt::Vertical); |
46 vLayout->setOrientation(Qt::Vertical); |
43 vLayout->addItem(mWebView); |
47 vLayout->addItem(mWebView); |