dfct/TrueFramelessWindow

QShortcut

Closed this issue ยท 1 comments

muby commented

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 commented

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 ...