In my app there is button that when you click on it the main window will be hid then if you type a shortcut the main window will show again.
But the shortcut doesn't work.
Here's my code for the shortcut:
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_K), this);
QObject::connect(shortcut, &QShortcut::activated, this, &MainWindow::openWindow);