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>
This commit is contained in:
Stefan Fuchs 2018-07-13 22:40:02 +02:00 committed by Dirk Hohndel
parent ff1490184b
commit 63e63ee07d

View file

@ -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();