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
↧