I am attempting to re-implement the Copy behavior for a QTextEdit object. The custom context menu I create works as expected when the 'Copy' button is clicked, but Ctrl+C isn't being handled correctly. Since the context menu doesn't have any issues, I'll omit that portion of the code.
// Create a text edit box for text editing
QTextEdit text_edit_box = new QTextEdit(getBaseWidget());
text_edit_copy_action = new QAction(QString("Copy"), getBaseWidget());
text_edit_copy_action->setShortcut(QKeySequence::Copy);
// Add custom copy action to the text edit box to ensure Ctrl+C uses our copy
// implementation
text_edit_box->addAction(text_edit_copy_action);
When I set the shortcut to be an unused key combination (e.g., Ctrl+Q) it works fine. It seems Ctrl+C is being handled differently since it's "built in".