size hint is the inner widget size
svn path=/trunk/KDE/kdelibs/; revision=1036073
This commit is contained in:
parent
1d611eac34
commit
31cb2730ea
@ -474,6 +474,17 @@ bool ScrollWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
return false;
|
||||
}
|
||||
|
||||
QSizeF ScrollWidget::sizeHint(Qt::SizeHint which, const QSizeF & constraint) const
|
||||
{
|
||||
QSizeF hint = QGraphicsWidget::sizeHint(which, constraint);
|
||||
|
||||
if (which == Qt::PreferredSize && d->widget) {
|
||||
return d->widget->size();
|
||||
}
|
||||
|
||||
return hint;
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
||||
#include <scrollwidget.moc>
|
||||
|
@ -167,6 +167,7 @@ protected:
|
||||
void wheelEvent(QGraphicsSceneWheelEvent *event);
|
||||
bool eventFilter(QObject *watched, QEvent *event);
|
||||
void focusInEvent(QFocusEvent *event);
|
||||
QSizeF sizeHint(Qt::SizeHint which, const QSizeF & constraint) const;
|
||||
|
||||
private:
|
||||
ScrollWidgetPrivate * const d;
|
||||
|
Loading…
Reference in New Issue
Block a user