diff --git a/examples/widgets/gallery/widgetgallery.cpp b/examples/widgets/gallery/widgetgallery.cpp index 92c878fcb6e..deef6b42181 100644 --- a/examples/widgets/gallery/widgetgallery.cpp +++ b/examples/widgets/gallery/widgetgallery.cpp @@ -149,7 +149,9 @@ WidgetGallery::WidgetGallery(QWidget *parent) QGuiApplication::styleHints()->setColorScheme(static_cast(index)); }); - auto helpLabel = createWidget1(tr("Press F1 over a widget to see Documentation"), "helpLabel"); + const QKeySequence helpKeySequence(QKeySequence::HelpContents); + auto helpLabel = createWidget1(tr("Press %1 over a widget to see Documentation") + .arg(helpKeySequence.toString(QKeySequence::NativeText)), "helpLabel"); auto disableWidgetsCheckBox = createWidget1(tr("&Disable widgets"), "disableWidgetsCheckBox"); @@ -197,7 +199,7 @@ WidgetGallery::WidgetGallery(QWidget *parent) setWindowTitle(tr("Widget Gallery Qt %1").arg(QT_VERSION_STR)); - new QShortcut(QKeySequence::HelpContents, this, this, &WidgetGallery::helpOnCurrentWidget); + new QShortcut(helpKeySequence, this, this, &WidgetGallery::helpOnCurrentWidget); } void WidgetGallery::setVisible(bool visible)