Undo/redo shortcuts

  • 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"));
    /// ...@

    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?

    Qt 5.1.0, MSVC 2012 x64

  • I can use an eventFilter for Ctrl+Z, but is there any better posibility?

  • [deleted] Sorry I didn't notice You answer...

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.