TrueFramelessWindow icon indicating copy to clipboard operation
TrueFramelessWindow copied to clipboard

QShortcut

Open muby opened this issue 4 years ago • 1 comments

I try to add shortcut inside the QWinWidget with 👍

QShortcut* ss = new QShortcut(QKeySequence(tr("F2", "Rename Record")), this); ss->setContext(Qt::ShortcutContext::ApplicationShortcut); connect(ss, &QShortcut::activated, this, [=]() { qDebug() << "TEST"; });

But the shortcut is never trigger.

Any idea ?

thanks

muby avatar Mar 14 '21 08:03 muby

I just add :

if(message == WM_KEYUP ||message == WM_KEYDOWN || message == WM_SETFOCUS) if (childWindow) SendMessage(childWindow, message, wParam, lParam);

At the end of WnProc and it's seems to work ...

If it can help ...

muby avatar Mar 24 '21 20:03 muby