X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fwebpreviewitem.cpp;h=8dcc40134b7916acf00efcabda31b4180b33471e;hp=7ee73922a07ea527fef1f18955bd533a6bc6c8b8;hb=ad695ee0ae2b39e00e33a10ab6eea6c765e4b233;hpb=76db8cdfbeffaaba359c8e80cf2146da9e9e7f8a diff --git a/src/qtui/webpreviewitem.cpp b/src/qtui/webpreviewitem.cpp index 7ee73922..8dcc4013 100644 --- a/src/qtui/webpreviewitem.cpp +++ b/src/qtui/webpreviewitem.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include WebPreviewItem::WebPreviewItem(const QUrl &url) : QGraphicsItem(0), // needs to be a top level item as we otherwise cannot guarantee that it's on top of other chatlines @@ -36,6 +36,7 @@ WebPreviewItem::WebPreviewItem(const QUrl &url) QWebView *webView = new QWebView; webView->settings()->setAttribute(QWebSettings::JavascriptEnabled, false); webView->load(url); + webView->setDisabled(true); webView->resize(1000, 750); QGraphicsProxyWidget *proxyItem = new QGraphicsProxyWidget(this); proxyItem->setWidget(webView); @@ -43,7 +44,7 @@ WebPreviewItem::WebPreviewItem(const QUrl &url) qreal xScale = (_boundingRect.width() - 2 * frameWidth) / webView->width(); qreal yScale = (_boundingRect.height() - 2 * frameWidth) / webView->height(); - proxyItem->scale(xScale, yScale); + proxyItem->setTransform(QTransform::fromScale(xScale, yScale), true); proxyItem->setPos(frameWidth, frameWidth); setZValue(30);