give d->widget the focus when the focus arrives on us

svn path=/trunk/KDE/kdelibs/; revision=1030582
This commit is contained in:
Marco Martin 2009-10-02 16:07:06 +00:00
parent a73a22d713
commit 7387d79cbd
2 changed files with 10 additions and 0 deletions

View File

@ -380,6 +380,15 @@ QWidget *ScrollWidget::nativeWidget() const
return 0;
}
void ScrollWidget::focusInEvent(QFocusEvent *event)
{
Q_UNUSED(event)
if (d->widget) {
d->widget->setFocus();
}
}
void ScrollWidget::resizeEvent(QGraphicsSceneResizeEvent *event)
{

View File

@ -162,6 +162,7 @@ protected:
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void wheelEvent(QGraphicsSceneWheelEvent *event);
bool eventFilter(QObject *watched, QEvent *event);
void focusInEvent(QFocusEvent *event);
private:
ScrollWidgetPrivate * const d;