return the page size as size hint
svn path=/trunk/KDE/kdelibs/; revision=1044708
This commit is contained in:
parent
db3d20e4d0
commit
54f38beec6
@ -464,6 +464,15 @@ void WebView::setGeometry(const QRectF &geometry)
|
||||
d->page->setViewportSize(geometry.size().toSize());
|
||||
}
|
||||
|
||||
QSizeF WebView::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
{
|
||||
if (which == Qt::PreferredSize) {
|
||||
return d->page->mainFrame()->contentsSize();
|
||||
} else {
|
||||
return QGraphicsWidget::sizeHint(which, constraint);
|
||||
}
|
||||
}
|
||||
|
||||
void WebViewPrivate::loadingFinished(bool success)
|
||||
{
|
||||
loaded = success;
|
||||
|
@ -196,6 +196,7 @@ class PLASMA_EXPORT WebView : public QGraphicsWidget
|
||||
void dragLeaveEvent(QGraphicsSceneDragDropEvent * event);
|
||||
void dragMoveEvent(QGraphicsSceneDragDropEvent * event);
|
||||
void dropEvent(QGraphicsSceneDragDropEvent * event);
|
||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
|
||||
|
||||
private:
|
||||
Q_PRIVATE_SLOT(d, void loadingFinished(bool success))
|
||||
|
Loading…
x
Reference in New Issue
Block a user