summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tabbar.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 49ed230b..43432ec4 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -168,9 +168,12 @@ void TabBar::showTabPreview(int tab)
m_previewPopup.data()->setFrameShape(QFrame::StyledPanel);
m_previewPopup.data()->setFrameShadow(QFrame::Plain);
m_previewPopup.data()->setFixedSize(w, h);
+
QLabel *l = new QLabel();
- view->page()->setViewportSize(currentView->page()->viewportSize());
- l->setPixmap(WebSnap::renderPreview(*(view->page()), w, h));
+ QWebPage copyPage(view->page());
+ copyPage.setViewportSize(currentView->page()->viewportSize());
+ l->setPixmap(WebSnap::renderPreview(copyPage, w, h));
+
m_previewPopup.data()->setView(l);
m_previewPopup.data()->layout()->setAlignment(Qt::AlignTop);
m_previewPopup.data()->layout()->setMargin(0);