Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[composer] Use a transparent background for HTML items
  • Loading branch information
nyalldawson committed Sep 22, 2014
1 parent 1cb328c commit b9e65b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/core/composer/qgscomposerhtml.cpp
Expand Up @@ -47,6 +47,12 @@ QgsComposerHtml::QgsComposerHtml( QgsComposition* c, bool createUndoCommands ):
mWebPage = new QWebPage();
mWebPage->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
mWebPage->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );

//This makes the background transparent. Found on http://blog.qt.digia.com/blog/2009/06/30/transparent-qwebview-or-qwebpage/
QPalette palette = mWebPage->palette();
palette.setBrush( QPalette::Base, Qt::transparent );
mWebPage->setPalette( palette );

mWebPage->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
QObject::connect( mWebPage, SIGNAL( loadFinished( bool ) ), this, SLOT( frameLoaded( bool ) ) );
if ( mComposition )
Expand Down

0 comments on commit b9e65b4

Please sign in to comment.