diff options
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r-- | src/widgets/graphicsview/qgraphicslinearlayout.cpp | 6 | ||||
-rw-r--r-- | src/widgets/graphicsview/qgraphicsproxywidget.cpp | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp index 5c438e0495..294905b986 100644 --- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp +++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp @@ -63,9 +63,9 @@ layout. The layout takes ownership of the items. In some cases when the layout item also inherits from QGraphicsItem (such as QGraphicsWidget) there will be a ambiguity in ownership because the layout item belongs to two ownership hierarchies. - See the documentation of QGraphicsLayoutItem::setOwnedByLayout() how to handle - this. - You can access each item in the layout by calling count() and itemAt(). Calling + See the documentation of QGraphicsLayoutItem::setOwnedByLayout() how to handle + this. + You can access each item in the layout by calling count() and itemAt(). Calling removeAt() or removeItem() will remove an item from the layout, without destroying it. diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp index 0ed0b0ec3f..68944817f6 100644 --- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp +++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp @@ -348,7 +348,7 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) // Run around the focus chain until we find a widget that can take tab focus. if (!child) { - child = next ? (QWidget *)widget : widget->d_func()->focus_prev; + child = next ? (QWidget *)widget : widget->d_func()->focus_prev; } else { child = next ? child->d_func()->focus_next : child->d_func()->focus_prev; if ((next && child == widget) || (!next && child == widget->d_func()->focus_prev)) { @@ -363,7 +363,7 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) uint focus_flag = qt_tab_all_widgets() ? Qt::TabFocus : Qt::StrongFocus; do { if (child->isEnabled() - && child->isVisibleTo(widget) + && child->isVisibleTo(widget) && ((child->focusPolicy() & focus_flag) == focus_flag) && !(child->d_func()->extra && child->d_func()->extra->focus_proxy)) { return child; @@ -1324,17 +1324,17 @@ void QGraphicsProxyWidget::focusInEvent(QFocusEvent *event) switch (event->reason()) { case Qt::TabFocusReason: { - if (QWidget *focusChild = d->findFocusChild(0, true)) + if (QWidget *focusChild = d->findFocusChild(0, true)) focusChild->setFocus(event->reason()); break; } case Qt::BacktabFocusReason: - if (QWidget *focusChild = d->findFocusChild(0, false)) + if (QWidget *focusChild = d->findFocusChild(0, false)) focusChild->setFocus(event->reason()); break; default: - if (d->widget && d->widget->focusWidget()) { - d->widget->focusWidget()->setFocus(event->reason()); + if (d->widget && d->widget->focusWidget()) { + d->widget->focusWidget()->setFocus(event->reason()); } break; } @@ -1371,8 +1371,8 @@ bool QGraphicsProxyWidget::focusNextPrevChild(bool next) Qt::FocusReason reason = next ? Qt::TabFocusReason : Qt::BacktabFocusReason; QWidget *lastFocusChild = d->widget->focusWidget(); if (QWidget *newFocusChild = d->findFocusChild(lastFocusChild, next)) { - newFocusChild->setFocus(reason); - return true; + newFocusChild->setFocus(reason); + return true; } return QGraphicsWidget::focusNextPrevChild(next); |