summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2019-05-13 18:21:08 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2019-05-15 07:53:34 +0000
commitc871ba2b23719354659938e5fb8c7898b22ab459 (patch)
treeea44097b02f66cbe93633ad5bad1533552477263 /src/widgets
parent33d2715dd34d39a3250d7b66b785f421c7e07719 (diff)
Add shortcut for select all in QSpinBox
This adds the shortcut to spinboxes and date edites. Fixes: QTBUG-48231 Change-Id: I91400e1990e4b1d7d971198c1e2a64149c2a835e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qabstractspinbox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qabstractspinbox.cpp b/src/widgets/widgets/qabstractspinbox.cpp
index 56697c5e8f..e99bb8e907 100644
--- a/src/widgets/widgets/qabstractspinbox.cpp
+++ b/src/widgets/widgets/qabstractspinbox.cpp
@@ -1319,6 +1319,7 @@ void QAbstractSpinBox::contextMenuEvent(QContextMenuEvent *event)
d->reset();
QAction *selAll = new QAction(tr("&Select All"), menu);
+ selAll->setShortcut(QKeySequence::SelectAll);
menu->insertAction(d->edit->d_func()->selectAllAction,
selAll);
menu->removeAction(d->edit->d_func()->selectAllAction);