I have modified my timelinedock.cpp like this:
action = new QAction(tr("Hello World"), this);
action->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_E));
connect(action, &QAction::triggered, this, [&]() {
LOG_DEBUG() << "Hello World!";
});
Actions.add("timelineHelloWorldAction", action);
and then the action was added like this:
trackOperationsMenu->addAction(Actions["timelineHelloWorldAction"]);
A new menu does get created in my timeline like I expected, but my keyboard shortcut does not trigger and I get this warning:
[Warning] <> QAction::event: Ambiguous shortcut overload: Ctrl+E
Am I missing some step to bind the shortcut? I thought that’s what setShortcut already does.