diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 17:37:37 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-06 17:37:37 (GMT) |
commit | ef0f6267822c782f0b555e15ddab24c41c51d2e8 (patch) | |
tree | 2638fa405a65e5b888b026f96584925fed7e3851 /src/gui/kernel/qwidget.cpp | |
parent | 9420db9284f20e28239d1c6e8a4cccf7707c014e (diff) | |
download | Qt-ef0f6267822c782f0b555e15ddab24c41c51d2e8.zip Qt-ef0f6267822c782f0b555e15ddab24c41c51d2e8.tar.gz Qt-ef0f6267822c782f0b555e15ddab24c41c51d2e8.tar.bz2 |
Added support for setting softkeys dynamically
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 7a8b143..e82fbd2 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -11531,7 +11531,8 @@ void QWidget::setSoftKeys(QAction *softKey) d->softKeys.clear(); if (softKey) d->softKeys.append(softKey); -// d->setNativeSoftKeys(softkeys); + if (QApplication::focusWidget() == this) + d->setNativeSoftKeys(this->softKeys()); } void QWidget::setSoftKeys(const QList<QAction*> &softKeys) @@ -11542,7 +11543,8 @@ void QWidget::setSoftKeys(const QList<QAction*> &softKeys) for(int i = 0; i < softKeys.count(); i++) d->softKeys.append(softKeys.at(i)); - // d->setNativeSoftKeys(softkeys); + if (QApplication::focusWidget() == this) + d->setNativeSoftKeys(this->softKeys()); } /*! \fn const QX11Info &QWidget::x11Info() const |