-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements a platform-dependent exit hotkey #395
Conversation
Hi @data-man thanks for the PR! I know However Microsoft does specify that So I think doing something similar to (untested): #ifdef Q_OS_WIN
ui->actionExit->setShortcut(QKeySequence("Alt+F4"));
#else
ui->actionExit->setShortcut(QKeySequence::Quit);
#endif would be preferrable rather than setting it to |
This is a built-in action in any Windows application, without a programmer having to do anything, if I'm not mistaken. :)
|
Correct. The only benefit of specifying it manually is so that it shows up in the menu as the assigned shortcut (which may or may not be beneficial to the user). So, to err on the side of simplicity, then yes you are correct and only |
Hmm, FocusWriter uses this: window.cpp
624: m_document_cache_thread->quit();
1311: m_actions["Quit"] = file_menu->addAction(QIcon::fromTheme("application-exit"), tr("&Quit"), this, &Window::close);
1312: m_actions["Quit"]->setShortcut(keyBinding(QKeySequence::Quit, tr("Ctrl+Q")));
1313: m_actions["Quit"]->setMenuRole(QAction::QuitRole); |
|
Ok, it's work for me in Linux! :) Should |
Yeah I think for clarity sake it can be removed to not cause any confusion later since it is being set outside of the ui file. |
Exit
hotkey to Ctrl+Q
It's ready, I hope. |
Awesome. Thanks! |
No description provided.