Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Undo/redo shortcuts

$
0
0
Hi, I would like to implement an undo/redo mechanism into my app. I have created the stack: m_undoStack = new QUndoStack(this); m_undoAction = m_undoStack->createUndoAction(this, QApplication::translate("MainWindowClass", "Undo")); m_undoAction->setShortcut(QKeySequence::Undo); ui.menuEdit->addAction(m_undoAction); /// ... When the user choose “Undo” from app menu (or Ctrl+Z), it is working correctly. But if a QSpinBox has focus, then Ctrl+Z does nothing. It looks like that the spin box “has eaten” the shorcut. Thats very annoying… Any solution? Thanks Qt 5.1.0, MSVC 2012 ×64

Viewing all articles
Browse latest Browse all 13965

Latest Images

Trending Articles



Latest Images