Try this and see if it works:
Qt Code:
  1. undoId = new QAction(this);
  2. undoId->setText("Action_undo");
  3. undoId->setShortcut(QKeySequence("CTRL+Z"));
  4. edit->addAction(undoId);
  5. connect(undoId, SIGNAL(triggered()), this, SLOT(undo()));
To copy to clipboard, switch view to plain text mode