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>
Frederik Gladhorn 2019-05-13 18:21:08 +02:00
parent 33d2715dd3
commit c871ba2b23
1 changed files with 1 additions and 0 deletions

View File

@ -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);