diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-04-21 11:42:24 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-04-23 13:23:59 +0000 |
commit | d24e8b312026510937e9d07f72aea1083d12f73a (patch) | |
tree | 991cc657c0a33c8628b86c4f8f94c2d04e0d99e5 /src/quicktemplates2/qquickitemdelegate.cpp | |
parent | dfc9a12fc070dc36c67960dfc56d47c6656316ec (diff) |
Set "strong" focus policy for buttons and sliders
Except item delegates, so they won't steal focus from the parent
view (ListView) or control (ComboBox).
NOTE: RangeSlider must be handled as a special case, because
focus must go to the handle which is interacted with.
Change-Id: Ie1aa8bb9b561e6242e373ec9fe874e3aaeacd16a
Task-number: QTBUG-51796
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/quicktemplates2/qquickitemdelegate.cpp')
-rw-r--r-- | src/quicktemplates2/qquickitemdelegate.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickitemdelegate.cpp b/src/quicktemplates2/qquickitemdelegate.cpp index d47589d4..b2719095 100644 --- a/src/quicktemplates2/qquickitemdelegate.cpp +++ b/src/quicktemplates2/qquickitemdelegate.cpp @@ -64,11 +64,13 @@ QT_BEGIN_NAMESPACE QQuickItemDelegate::QQuickItemDelegate(QQuickItem *parent) : QQuickAbstractButton(parent) { + setFocusPolicy(Qt::NoFocus); } QQuickItemDelegate::QQuickItemDelegate(QQuickAbstractButtonPrivate &dd, QQuickItem *parent) : QQuickAbstractButton(dd, parent) { + setFocusPolicy(Qt::NoFocus); } QFont QQuickItemDelegate::defaultFont() const |