diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2018-07-13 22:40:02 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-07-13 14:46:10 -0700 |
commit | 63e63ee07d0165d24807c79bd316092079c9949f (patch) | |
tree | 409deaffce2b5a3b8a10a3eda808664b95924681 /core | |
parent | ff1490184b3354fb640ed523c24af660ae9cfbc2 (diff) | |
download | subsurface-63e63ee07d0165d24807c79bd316092079c9949f.tar.gz |
Disable the WindowContextHelpButtonHint for Qt >=5.10
Disables the WindowContextHelpButtonHint by default on Qt::Sheet and
Qt::Dialog widgets. This hides the ? button on Windows, which only
makes sense if you use QWhatsThis functionality.
This value has been added in Qt 5.10.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/qt-init.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/qt-init.cpp b/core/qt-init.cpp index b1a235cb6..5596b3f95 100644 --- a/core/qt-init.cpp +++ b/core/qt-init.cpp @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include <QApplication> +#include <Qt> #include <QNetworkProxy> #include <QLibraryInfo> #include <QTextCodec> @@ -42,6 +43,11 @@ void init_qt_late() QCoreApplication::setApplicationName("Subsurface"); #endif } + // Disables the WindowContextHelpButtonHint by default on Qt::Sheet and Qt::Dialog widgets. + // This hides the ? button on Windows, which only makes sense if you use QWhatsThis functionality. +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) + QCoreApplication::setAttribute(Qt::AA_DisableWindowContextHelpButton); +#endif // find plugins installed in the application directory (without this SVGs don't work on Windows) SettingsObjectWrapper::instance()->load(); |