diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-20 14:01:15 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-10-20 14:01:15 (GMT) |
commit | 393db7ada80e803c73fa65f68f5dd037c16ed836 (patch) | |
tree | 0f047d6127e36d23dd0e0d214b2d887038d483c5 /src/gui/graphicsview | |
parent | d4dd08918082372d3df7be2d3a6671cbd7bc7fd3 (diff) | |
parent | cbca69bb0c7e3c42bf7d2d964057f38263de0553 (diff) | |
download | Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.zip Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.tar.gz Qt-393db7ada80e803c73fa65f68f5dd037c16ed836.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r-- | src/gui/graphicsview/qgraphicsproxywidget.cpp | 15 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index b7a3962..64c51ad 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -57,6 +57,9 @@ #include <QtGui/qpainter.h> #include <QtGui/qstyleoption.h> #include <QtGui/qgraphicsview.h> +#include <QtGui/qlistview.h> +#include <QtGui/qlineedit.h> +#include <QtGui/qtextedit.h> QT_BEGIN_NAMESPACE @@ -86,7 +89,9 @@ QT_BEGIN_NAMESPACE of embedded widgets through creating a child proxy for each popup. This means that when an embedded QComboBox shows its popup list, a new QGraphicsProxyWidget is created automatically, embedding the popup, and - positioning it correctly. + positioning it correctly. This only works if the popup is child of the + embedded widget (for example QToolButton::setMenu() requires the QMenu instance + to be child of the QToolButton). \section1 Embedding a Widget with QGraphicsProxyWidget @@ -184,6 +189,7 @@ QT_BEGIN_NAMESPACE */ extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); +extern bool qt_tab_all_widgets; /*! \internal @@ -369,6 +375,7 @@ QVariant QGraphicsProxyWidgetPrivate::inputMethodQueryHelper(Qt::InputMethodQuer /*! \internal + Some of the logic is shared with QApplicationPrivate::focusNextPrevChild_helper */ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) const { @@ -382,14 +389,16 @@ QWidget *QGraphicsProxyWidgetPrivate::findFocusChild(QWidget *child, bool next) child = next ? child->d_func()->focus_next : child->d_func()->focus_prev; if ((next && child == widget) || (!next && child == widget->d_func()->focus_prev)) { return 0; - } + } } QWidget *oldChild = child; + uint focus_flag = qt_tab_all_widgets ? Qt::TabFocus : Qt::StrongFocus; do { if (child->isEnabled() && child->isVisibleTo(widget) - && (child->focusPolicy() & Qt::TabFocus)) { + && (child->focusPolicy() & focus_flag == focus_flag) + && !(child->d_func()->extra && child->d_func()->extra->focus_proxy)) { return child; } child = next ? child->d_func()->focus_next : child->d_func()->focus_prev; diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 0773559..a624b10 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5297,7 +5297,7 @@ void QGraphicsScene::setActivePanel(QGraphicsItem *item) /*! \since 4.4 - Returns the current active window, or 0 if there is no window is currently + Returns the current active window, or 0 if no window is currently active. \sa QGraphicsScene::setActiveWindow() |