Skip to content
Permalink
Browse files

Enable plugins (eg. to show PDFs) in webview widgets used on feature …

…info in identify or in forms
  • Loading branch information
jef-n committed Sep 14, 2016
1 parent 9acb52d commit cdaec5a45e3ee2354490e3cc95ff43307e1838fe
Showing with 3 additions and 0 deletions.
  1. +2 −0 src/app/qgsidentifyresultsdialog.cpp
  2. +1 −0 src/gui/editorwidgets/qgswebviewwidgetwrapper.cpp
@@ -75,6 +75,7 @@ QgsIdentifyResultsWebView::QgsIdentifyResultsWebView( QWidget *parent ) : QgsWeb
page()->setLinkDelegationPolicy( QWebPage::DontDelegateLinks );
settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
@@ -115,6 +116,7 @@ QgsWebView *QgsIdentifyResultsWebView::createWindow( QWebPage::WebWindowType typ
wv->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
wv->settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
wv->settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
wv->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif
@@ -125,6 +125,7 @@ void QgsWebViewWidgetWrapper::initWidget( QWidget* editor )
mWebView->page()->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
mWebView->settings()->setAttribute( QWebSettings::LocalContentCanAccessRemoteUrls, true );
mWebView->settings()->setAttribute( QWebSettings::JavascriptCanOpenWindows, true );
mWebView->settings()->setAttribute( QWebSettings::PluginsEnabled, true );
#ifdef QGISDEBUG
mWebView->settings()->setAttribute( QWebSettings::DeveloperExtrasEnabled, true );
#endif

0 comments on commit cdaec5a

Please sign in to comment.
You can’t perform that action at this time.