From bad1a548fb46bef2ff52905d8dd43079a5894ff4 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Sat, 27 Dec 2025 20:00:19 +0100 Subject: [PATCH] Fix resource table shortcuts conflicting with OBS shortcuts This could happen when adding the variable tab as a dock. The problem is visible in the OBS log: QAction::event: Ambiguous shortcut overload: Del --- lib/utils/resource-table.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/resource-table.cpp b/lib/utils/resource-table.cpp index b2d4c706..903c30ae 100644 --- a/lib/utils/resource-table.cpp +++ b/lib/utils/resource-table.cpp @@ -65,13 +65,16 @@ ResourceTable::ResourceTable(QWidget *parent, const QString &help, [openSettings]() { openSettings(); }); auto settingsShortcut = new QShortcut(QKeySequence("F2"), this); + settingsShortcut->setContext(Qt::WidgetWithChildrenShortcut); QWidget::connect(settingsShortcut, &QShortcut::activated, this, openSettings); auto removeShortcut = new QShortcut(QKeySequence("Del"), this); + removeShortcut->setContext(Qt::WidgetWithChildrenShortcut); QWidget::connect(removeShortcut, &QShortcut::activated, this, [this]() { Remove(); }); auto newShortcut = new QShortcut(QKeySequence("Ctrl+N"), this); + newShortcut->setContext(Qt::WidgetWithChildrenShortcut); QWidget::connect(newShortcut, &QShortcut::activated, this, [this]() { Add(); }); }