main: Globally disable the "?" button on dialogs (#6263)

Sets the AA_DisableWindowContextHelpButton attribute to disable this useless button globally. This is disabled by default on Qt6.
This commit is contained in:
Morph 2023-01-28 11:08:15 -05:00 committed by GitHub
parent 0f6478a928
commit bb8cb3ff82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 9 deletions

View file

@ -2644,6 +2644,10 @@ int main(int argc, char* argv[]) {
#ifdef __APPLE__
std::string bin_path = FileUtil::GetBundleDirectory() + DIR_SEP + "..";
chdir(bin_path.c_str());
#endif
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// Disables the "?" button on all dialogs. Disabled by default on Qt6.
QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif
QCoreApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity);
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);