summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-03-30 09:19:15 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-03-30 09:22:57 (GMT)
commitcfe17692dc6c65b2979dbd648d2eebff78a83200 (patch)
tree687e799a11694c7c996c14b59964a9b65762e08e /src
parent9748269cb58266fdfdac2c8820dad8c473dcf512 (diff)
downloadQt-cfe17692dc6c65b2979dbd648d2eebff78a83200.zip
Qt-cfe17692dc6c65b2979dbd648d2eebff78a83200.tar.gz
Qt-cfe17692dc6c65b2979dbd648d2eebff78a83200.tar.bz2
Provide a previousInFocusChain for consistancy
Task-number: 201649 Reviewed-by: Thierry
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qwidget.cpp14
-rw-r--r--src/gui/kernel/qwidget.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 09162ee..ce14c82 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -5897,6 +5897,8 @@ QWidget *QWidget::focusWidget() const
/*!
Returns the next widget in this widget's focus chain.
+
+ \sa previousInFocusChain
*/
QWidget *QWidget::nextInFocusChain() const
{
@@ -5904,6 +5906,18 @@ QWidget *QWidget::nextInFocusChain() const
}
/*!
+ Returns the previous widget in this widget's focus chain.
+
+ \sa nextInFocusChain
+
+ \since 4.6
+*/
+QWidget *QWidget::previousInFocusChain() const
+{
+ return const_cast<QWidget *>(d_func()->focus_prev);
+}
+
+/*!
\property QWidget::isActiveWindow
\brief whether this widget's window is the active window
diff --git a/src/gui/kernel/qwidget.h b/src/gui/kernel/qwidget.h
index f54ebf9..309463e 100644
--- a/src/gui/kernel/qwidget.h
+++ b/src/gui/kernel/qwidget.h
@@ -539,6 +539,7 @@ public:
QWidget *focusWidget() const;
QWidget *nextInFocusChain() const;
+ QWidget *previousInFocusChain() const;
// drag and drop
bool acceptDrops() const;