Skip to content

Commit b9e65b4

Browse files
committedSep 22, 2014
[composer] Use a transparent background for HTML items
1 parent 1cb328c commit b9e65b4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/core/composer/qgscomposerhtml.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ QgsComposerHtml::QgsComposerHtml( QgsComposition* c, bool createUndoCommands ):
4747
mWebPage = new QWebPage();
4848
mWebPage->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
4949
mWebPage->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );
50+
51+
//This makes the background transparent. Found on http://blog.qt.digia.com/blog/2009/06/30/transparent-qwebview-or-qwebpage/
52+
QPalette palette = mWebPage->palette();
53+
palette.setBrush( QPalette::Base, Qt::transparent );
54+
mWebPage->setPalette( palette );
55+
5056
mWebPage->setNetworkAccessManager( QgsNetworkAccessManager::instance() );
5157
QObject::connect( mWebPage, SIGNAL( loadFinished( bool ) ), this, SLOT( frameLoaded( bool ) ) );
5258
if ( mComposition )

0 commit comments

Comments
 (0)
Please sign in to comment.