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 2d0932d commit a54bfc27ca96a54b8fce05d6e9b26f8a723e777d
Showing with 3 additions and 0 deletions.
  1. +2 −0 src/app/qgsidentifyresultsdialog.cpp
  2. +1 −0 src/gui/editorwidgets/qgswebviewwidgetwrapper.cpp
@@ -70,6 +70,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
@@ -110,6 +111,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 a54bfc2

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